Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Get Modrinth App Upgrade to Modrinth+
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings
Annotated DI

Annotated DI

Dependency Injection library for Minecraft mods

13.9k
11
Library

Compatibility

Minecraft: Java Edition

1.21.x
1.20.x
1.19.x
1.18.x
1.17.x
1.16.x
1.15.x
1.14.x

Platforms

Fabric
Forge
Quilt

Supported environments

Client-side
Server-side
Client and server

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Links

Report issues View source Visit wiki Join Discord server
Donate on Ko-fi

Creators

The-Fireplace
The-Fireplace Owner
Waterpicker
Waterpicker Contributor

Details

Licensed Apache-2.0
Published 3 years ago
Updated 8 hours ago
DescriptionChangelogVersions

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

Modrinth is open source.

main@016c3d7

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.