Armory API
Armory API 是一个轻量级库,为 Minecraft 模组中定义和管理工具集与护甲集提供共享代码。
该项目从 XunLib 中提取出来,旨在独立支持 Forge,并保持 API 的轻量、模块化以及加载器无关性。
支持的加载器:
- Forge
- NeoForge
- Fabric
特性
- 用于定义 ToolSet 和 ArmorSet 的 API
- 减少注册工具和护甲时的重复代码
- 加载器无关的实现
- 范围小且依赖极少
- 兼容模组化的工具类型
常见问题
我可以只使用 ToolSet 或只使用 ArmorSet 吗?
可以。这两个系统相互独立,可以单独使用。
这会自动处理物品注册吗?
不会。注册由使用该 API 的模组或特定于加载器的实现来处理。
我可以用它来创建自定义的工具或护甲行为吗?
可以。Armory API 包含了用于实现自定义工具和护甲行为的辅助 API,允许模组扩展或定制超出原版行为的功能。
我可以添加自定义或模组化的工具类型吗? 可以。ToolPieceType 专门设计用于允许具有自定义类别的工具,它们拥有自己的物品工厂、统计数据、属性和属性值。
一个 ToolSet 可以只包含部分工具类型吗? 可以。ToolSet 不再局限于标准的原版工具集合。可以包含任何受支持的 ToolPieceType 实例的组合。
其他库或框架可以与 Armory API 集成吗?
可以。该 API 设计得保持轻量且模块化,以便在需要时可以集成到更大的模组开发框架中。
依赖
Armory API 是一个库模组,仅被明确依赖它的模组所必需。
Armory API 不会替换加载器的物品注册系统,也不要求使用该 API 的模组必须使用特定的注册框架。
注意:模组 ID 为 armories,以避免与其他使用相似名称的模组发生冲突。
Armory API
Armory API is a lightweight library that provides shared code for defining and managing tool sets and armor sets in Minecraft mods.
The project was extracted from XunLib to support Forge independently and keep the API lightweight, modular, and loader-agnostic.
Supported loaders:
- Forge
- NeoForge
- Fabric
Features
- APIs for defining ToolSet and ArmorSet
- Reduced duplication when registering tools and armor
- Loader-independent implementation
- Small scope and minimal dependencies
- Compatibility with modded tool types
FAQs
Can I use only ToolSet or only ArmorSet?
Yes. The systems are independent and can be used separately.
Does this handle item registration automatically?
No. Registration is handled by the consuming mod or loader-specific implementation.
Can I create custom tool or armor behaviors with this?
Yes. Armory API includes helper APIs for implementing custom tool and armor behavior, allowing mods to extend or customize functionality beyond vanilla behavior.
Can I add custom or modded tool types? Yes. ToolPieceType is specifically designed to allow custom tool categories with their own item factories, statistics, properties, and attributes.
Can a ToolSet contain only some tool types? Yes. A ToolSet is no longer limited to the standard vanilla tool collection. Any combination of supported ToolPieceType instances can be included.
Can other libraries or frameworks integrate with Armory API?
Yes. The API is designed to stay lightweight and modular so it can be integrated into larger modding frameworks if needed.
Dependency
Armory API is a library mod and is only required by mods that explicitly depend on it.
Armory API does not replace the loader's item registration system and does not require consuming mods to use a particular registration framework.
Note: The mod ID is armories to avoid conflicts with other mods using similar names.
下载 Armory API
下载 Armory API
下载 Armory API
下载 Armory API
下载 Armory API
下载 Armory API
下载 Armory API
下载 Armory API
下载 Armory API
下载 Armory API
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
模组
添加区块认领和玩家组队功能,并与 Xaero's Minimap 和 World Map 集成
评论 0
登录后参与评分
还没有评论,来抢沙发吧