
Annotated DI
Dependency Injection library for Minecraft mods
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
How to Install Annotated DI on Your Server
Order Server
Order a Minecraft Java server with at least 3 GB RAM (4 GB recommended).
Set fabric Loader
In the panel under "Egg", select the fabric loader and matching Minecraft version (1.21.7).
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
Minecraft Versions
1.21.7, 1.21.6, 1.21.5 (+36 more)
Server-side
~ OptionalRecommended 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.
Similar Mods
Rent Modded Server
Install Annotated DI with just one click on your server.