介绍
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
常见问题
Annotated DI 支持哪些 Minecraft 版本?
Annotated DI 支持 Minecraft Java 版 1.14–1.21.11,共 43 个版本,可用的加载器:Fabric / Forge / Quilt。下载时注意选择和你游戏版本一致的文件。
Annotated DI 怎么安装?
先用 PCL2 或 HMCL 启动器安装对应版本的 Fabric / Forge / Quilt,再把下载的 .jar 文件放进游戏目录的 mods 文件夹,重新启动游戏即可。开启了版本隔离的,mods 文件夹在 versions/版本名 下面。运行环境:客户端 / 服务端。
Waterpicker 的其他作品
查看全部 →DimensionalDoors
迷宫、谜题与陷阱。能够将你传送到任意地方的门与传送门。来自诡异的 Limbo 维度、充满嫉妒与恶意的双眼正注视着你。
Custom Portal API [Forge]
在代码中轻松创建自定义传送门。
Custom Portal API [Forge]
通过API制作自定义传送门
Cobblemon – Fight or Flight
一个Cobblemon附属模组,让宝可梦在受到刺激时逃跑或反击。
评论
登录后评论和评分