Arboreal -
Arboreal 是一个模组开发库与微型核心,旨在简化模组开发的许多方面。该库也汇聚了我在 Minecraft 模组开发社区中积累的大量知识与经验。
Arboreal 主要添加了以下内容:
- “任务(task)”系统,使许多流程变得更为简便,例如注册(提供内置的
register 方法),或网络通信(自动处理负载的类型并注册接收器)。
- Util 工具类,包含许多意想不到的实用方法,例如获取物品栏进度或从特定 BlockPos 收集附近的实体。
- 大量事件,允许更深度地与 Minecraft 世界交互,例如编辑怪物的目标,或根据是否满足特定条件来修改玩家受到的伤害量。
- 基于构建器模式的实例化数据包系统。
所有内容均集中在一个核心的 Arboreal 类中,该类需在您的 ModInitializer 中进行实例化,如下所示:
public class MyMod implements ModInitializer {
public static final Arboreal ARBOREAL = new Arboreal("my_mod_id");
}
Arboreal 类作为 Arboreal 进入您模组的入口点,允许注册并运行任务,如下所示:
public void onInitialize() {
ARBOREAL.addHandler(MyModItems.TASK);
ARBOREAL.addHandler(MyModNetworking::new);
ARBOREAL.initMain();
}
本项目是我倾注心血的作品,经过几个月的尝试与整理而成,希望它能满足您的需求!
其他致谢 -
AcoYTMC - AcornLib 中 formatString 方法的作者,Arboreal 的 ItemUtils#formatString 即基于此方法。
如何集成 Arboreal
在您的 build.gradle 中添加:
maven {
url = "https://api.modrinth.com/maven"
}
在您的 build.gradle dependencies 中添加:
implementation "maven.modrinth:arboreal:ARBOREAL_VERISON"
Arboreal -
Arboreal is a modding library and miniature core built to streamline many aspects of modding. The library also serves as a culmination of much of the knowledge and learnings I've obtained during my time in the Minecraft modding community.
Arboreal adds, primarily:
- A "task" system, making many processes much easier, such as registration (providing built-in
register methods), or networking (automatic typing of payloads and registration of receivers).
- Util classes with many strangely helpful methods, such as getting an item bar's progress or collecting nearby entities from a BlockPos.
- Many events allowing for more interaction with the Minecraft world, such as editing the target of a mob, or editing how much damage a player receives depending on if certain criteria is met.
- A builder-based instantiated datapack system.
All available within a central Arboreal class, which is to be instantiated within your ModInitializer, as shown here:
public class MyMod implements ModInitializer {
public static final Arboreal ARBOREAL = new Arboreal("my_mod_id");
}
The Arboreal class serves as the main entrypoint of Arboreal into your mod, allowing for tasks to be registered and ran, as shown here:
public void onInitialize() {
ARBOREAL.addHandler(MyModItems.TASK);
ARBOREAL.addHandler(MyModNetworking::new);
ARBOREAL.initMain();
}
This project serves as my labor of love that I've been dabbling with and putting together over the course of a couple months, and I do hope it serves a need that you may have!
Misc. Credits -
AcoYTMC - Author of the formatString method from AcornLib, which Arboreal's ItemUtils#formatString was based on.
How To Implement Arboreal
In your build.gradle:
maven {
url = "https://api.modrinth.com/maven"
}
Into your build.gradle dependencies:
implementation "maven.modrinth:arboreal:ARBOREAL_VERISON"
评论 0
登录后参与评分
还没有评论,来抢沙发吧