Download Annotated DI — Minecraft Mods — MetaMods

Annotated DI

Active

Downloads

13

Last update

3 months ago

Versions

1.14 — 1.21.7
Client
Fabric
Forge
Quilt
Libraries

Annotated DI

Annotated DI is a convenient wrapper for the Guice library, enhanced with special utilities for more comfortable work with Minecraft modifications. This system allows developers to apply the Dependency Injection pattern when creating mods and APIs for them.

Main Features for Modders

The @Implementation annotation significantly simplifies dependency configuration, eliminating the need to create separate configuration files for all bindings. At the same time, the API does not require dependency on the implementation at the compilation stage.

The central Injector provides the ability to inject classes and interfaces from other modifications, which promotes better compatibility between different mods.

The entrypoint/event system allows developers to add their own modules to the Injector when it is created. This feature will be useful mainly for advanced usage scenarios with complex bindings.

Frequently Asked Questions

What are the benefits for users?

Mods developed using this system are usually easier to maintain, which can speed up the release of updates. Although this solution is not suitable for every project, it is especially effective when creating APIs that can be used by other modifications.

Is there standalone functionality?

The mod appears in the list of installed modifications but does not perform any independent actions in the game.

Are dependencies automatically downloaded?

No, the system does not handle automatic downloading of mod dependencies.