Registry Helper Library
你是否厌倦了手动编写那些烦人的注册表?这个库可以帮你解决这个问题!
Registry Helper Library 是一个轻量级的实用 API,专为 Fabric 模组开发者设计,用于消除注册物品、方块和护甲时涉及的样板代码。与其为每个对象手动构造 ResourceKey 和 Identifier 实例,并通过 Registry.register 调用进行连接,开发者只需为每个注册表创建一个 RegistryHelper 实例,并调用简单且专用的方法即可。
该库开箱即用地处理常见情况:普通物品、自动生成 BlockItem 的方块、护甲部件以及完整的四件套护甲——同时仍暴露一个通用的 register 方法,用于注册任何其他原版注册表(如声音、实体等)。它还跟踪所有已注册的内容,便于后续遍历模组的物品和方块(例如用于填充创造模式标签页)。
你可以在其 Github 上找到此模组的教程 / Wiki。
Registry Helper Library
Are you tired of writing all those annoying registries by hand? This library will help with that!
Registry Helper Library is a lightweight utility API for Fabric mod developers that eliminates the boilerplate involved in registering items, blocks, and armor. Instead of manually constructing ResourceKey and Identifier instances and wiring them through Registry.register calls for every single object, developers create one RegistryHelper instance per registry and call simple, purpose-built methods.
The library handles the common cases out of the box, plain items, blocks with automatically-generated BlockItems, armor pieces, and full four-piece armor sets — while still exposing a fully generic register method for any other vanilla registry (sounds, entities, etc.). It also tracks everything it registers, making it easy to loop over your mod's items and blocks later (for populating a creative tab, for example).
You can find the howto / Wiki on this mod on it's Github
下载 Registry Helper Library
下载 Registry Helper Library
下载 Registry Helper Library
下载 Registry Helper Library
下载 Registry Helper Library
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
可定制的鞘翅模组,支持装饰纹饰、旗帜图案等更多功能!
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
评论 0
登录后参与评分
还没有评论,来抢沙发吧