关于
Unified API 是一个适用于 Fabric 和 NeoForge 的跨加载器 API,使您能够无需额外努力即可创建多加载器模组。
它还是一个以数据为核心的库,为数据包和资源包提供了强大的新功能,包括数据驱动的方块、物品、实体变体等更多内容。
此外,该库还为模组开发者提供了一个高级数据生成器,拥有统一的注册生成器,可将所有方块、物品和实体的代码集中在一个地方。
本项目的目标是提供一种最新、高效且灵活的方式来创建模组内容,其速度远快于其他多加载器项目或官方加载器本身通常所能提供的效率。
要真正了解这些功能的强大之处,请访问 Unified API Documentation。
功能亮点
一站式注册生成。
在同一个地方注册您的内容。所有行为均由原版和 Unified API 特定的 JSON 处理,这些 JSON 由上述代码生成。用户或其他项目可以覆盖这些 JSON 以实现完全的可定制性。
public static final SuppliedItem EXAMPLE_ITEM = ITEMS.register(
"example_item",
VanillaItemCodecs.ITEM.create(),
builder -> builder
.properties(properties -> properties
.stacksTo(16)
.rarity(Rarity.UNCOMMON)
)
.assets(assets -> assets
.handheld()
)
.data(data -> data
.dropSelf()
)
);
数据驱动注册表
方块、物品、实体、创造模式标签页、声音事件等均可通过 JSON 创建。
{
"type": "minecraft:block",
"properties": {
// 属性在此处填写
}
}
传统多加载器延迟加载
在多加载器环境中,您的内容需要被延迟加载。UnifiedRegistries 配合 Supplied<Object> 的处理方式与其他多加载器项目类似,并附带一些便捷的优势。
丰富的事件与辅助工具
修改生物群系属性或特性、更改默认组件、注入战利品表或修改单个条目、创建怪物变体等等——支持通过代码驱动的事件和数据驱动的监听器实现。
此外,还包含完整的网络 API、数据附加组件、特定结构的音乐以及制作复杂模组时所需的任何其他功能。
即时创建完整套装
常见但创建繁琐的内容,如木材套装、砖块套装、彩色套装、装备套装等,可以瞬间生成为 JSON,具备您通常需要花费大量时间手动创建的所有功能。减少无意义的重复工作是创建 Unified API 而非使用现有选项的主要动力之一。
更多的惊人功能
Unified API 的目标是大幅缩短添加模组内容所需的时间,同时为非模组开发者暴露许多新功能。您不需要将此 API 与其他 API 一起使用,考虑到除了新的敏捷功能外还包含了更传统的注册表,从现有系统迁移应该相对简单。
再次强调,请务必查看 unified-api.dev 获取文档和完整功能列表!
About
Unified API is a cross-loader API for both Fabric & NeoForge that enables you to create multiloader mods at no additional effort.
It is also a data-focused library that provides powerful new features to datapacks and resource packs, including data-driven blocks, items, entity variants and much more.
Additionally, this library is an advanced data generator for modders, with unified registration generators that put all your block, item and entity code in the one place.
The goal of this project is to provide an up-to-date, efficient & flexible way of creating modded content at a much faster pace than what is typically afforded both by competing multiloader projects and the official loaders themselves.
To prove the true extent of these features, you'll need to visit the Unified API Documentation.
Feature Highlights
All-in-one registration generation.
Register your content in one place. All behaviour is handled by vanilla and Unified API-specific JSON, generated from this code. JSON can then be overriden by users or other projects for full customisability.
public static final SuppliedItem EXAMPLE_ITEM = ITEMS.register(
"example_item",
VanillaItemCodecs.ITEM.create(),
builder -> builder
.properties(properties -> properties
.stacksTo(16)
.rarity(Rarity.UNCOMMON)
)
.assets(assets -> assets
.handheld()
)
.data(data -> data
.dropSelf()
)
);
Data-driven Registries
Blocks, Items, Entities, Creative Tabs, Sound Events and more can all be created via JSON.
{
"type": "minecraft:block",
"properties": {
// properties go here
}
}
Traditional Multiloader Deferring
In a multiloader environment, your content needs to be deferred. UnifiedRegistries coupled with Supplied<Object> handles this much like other multiloader projects, with some convenient bonuses.
Extensive Events & Helpers
Modify biome attributes or features, change default components, inject loot tables or alter individual entries, create mob variants and much more - supported via both code-driven events and data-driven listeners.
Furthermore, there is a full networking api, data attachments, structure-specific music and anything else you'd expect to need when making complex mods.
Instantly create entire sets
Common, tedious-to-create content like woodsets, brick sets, colored sets, equipment sets and more can be generated as JSON in an instant, with all functionality you'd normally spend a while creating manually. Cutting down on meaningless busywork was a major motivator in creating Unified API over using options already out there.
An Absurd Amount More
The goal of Unified API is to drastically reduce the time it takes to add modded content, whilst additionally exposing many new features to non-modders. You do not need to use another api alongside this one, and migration from your existing systems should be relatively simple considering the inclusion of more traditional registries alongside new, more agile features.
Once again, be sure to check out unified-api.dev for documentation and the full feature set!
下载 Unified API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Unified API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Unified API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Unified API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Unified API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Unified API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Unified API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Unified API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Unified API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Unified API
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
暂无更新日志
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
AE2:一款流行的自动化与存储模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧