Annotated DI

Annotated DI

Dependency Injection library for Minecraft mods

by
26.6K Downloads
fabricforgequiltlibrary
Rent Server with this Mod

About this Mod

Annotated DI is a wrapper around Guice with a few extra utilities added for more convenient use with Minecraft mods. This allows the Dependency Injection design pattern to be used when making mods and APIs for them.

Extra utilities for modders:

  • The @Implementation annotation, which can be used to wire up all the dependencies conveniently without needing to make a separate file to configure all the bindings, and without forcing the API to have a compile time dependency on the implementation.
  • A central Injector, which allows mods to inject classes/interfaces from other mods.
  • An entrypoint/event that provides a way for modders to add a custom Module to the Injector when it's created - most mods won't need this unless they're doing some advanced bindings of some kind.

Documentation for developers can be found on the wiki.

Q&A

How does this help users?

Mods that are designed to use this can be easier to maintain than mods that don't use it, which can result in faster updates. It's not the right solution for every mod, but it can be useful for some, especially when making an API that other mods can use.

Does this do anything on its own?

It shows up in the mod list, but that's about it.

Does this download mod dependencies for you?

No

Available Versions

4.0.8release
MC 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7fabric, quilt
June 30, 2025
4.0.8release
MC 1.20.6fabric, quilt
June 30, 2025
4.0.8release
MC 1.20.6forge
June 30, 2025
4.0.8release
MC 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4fabric, quilt
June 30, 2025
4.0.8release
MC 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4forge
June 30, 2025

How to Install Annotated DI on Your Server

1

Order Server

Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).

2

Set fabric Loader

In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.7).

3

Install Mod

Open the mod browser in the dashboard and search for "Annotated DI". Click "Install" – done! Alternatively, upload the .jar via SFTP to the /mods folder.

Compatibility

Mod Loaders

fabricforgequilt

Minecraft Versions

1.21.7, 1.21.6, 1.21.5 (+36 more)

Server-side

~ Optional

Recommended RAM

4 GB(min. 3 GB)

Frequently Asked Questions

Annotated DI server crashes on startup – what to do?

Most common cause: wrong fabric version or insufficient RAM. Check the server log (latest.log) for "OutOfMemoryError" or "Mixin" errors. With Mado Hosting: ensure at least 3 GB RAM is allocated and the loader matches the mod version (1.21.7). You can switch loaders with one click in the panel.

Is Annotated DI compatible with fabric and forge and quilt?

Annotated DI officially supports fabric, forge, quilt for Minecraft 1.21.7, 1.21.6, 1.21.5. Note: Forge and Fabric mods are NOT cross-compatible – pick one loader and stick with it. The Mado dashboard automatically detects incompatible loader combinations.

Server lagging with Annotated DI – how to optimize performance?

Recommended RAM: 4 GB (per 8 players). Use /spark profiler to check if Annotated DI consumes the most tick time. Common fixes: reduce server view-distance to 8-10, install "performant" or "starlight" as supplementary mods on Forge. With Mado Hosting, your server runs on NVMe SSDs with dedicated CPU cores for minimal latency.

Rent Modded Server

Install Annotated DI with just one click on your server.

Recommended RAM
4 GBab €8/mo
Min. 3 GB | +1 GB pro 8 Spieler
Create Server Now
1-Click Mod Install
NVMe SSD Storage
DDoS Protection included

Details

License
Apache License 2.0
Server-side
Optional

Supported Versions

1.21.71.21.61.21.51.21.41.21.31.21.21.21.11.211.20.61.20.5+29 more