重要提示
这是 TheIllusiveC4 的 CuriosAPI 在 NeoForge(当前状态)和 Forge(未来版本)上的非官方延续版本。请勿将此移植版的问题反馈给 TheIllusiveC4,请使用独立的 GitHub Issues 页面或 Discord 邀请链接进行报告。模组描述和文档将很快更新,敬请期待!
概述
Curios 是一个灵活且可扩展的饰品/装备 API,供用户和开发者使用。其目的是为开发者提供便捷且兼容的方式,以添加额外的饰品/装备槽位,同时赋予用户根据自身偏好配置这些槽位的能力。默认情况下,Curios 除了提供一个物品栏 GUI 外,不会添加任何内容。没有默认的槽位,仅包含两个物品,后者仅通过创造模式菜单可用,主要作为开发者编码集成时的示例。
特性
- 通过中央库扩展装备槽位。新装备槽位可以通过标识符注册表轻松创建和管理。相同的标识符会合并在一起,以避免功能冗余并为潜在物品提供最大兼容性,而唯一标识符仍可用于在适当时机标记特殊类型。
- 槽位按需创建。默认不包含任何槽位,所有槽位仅在需要时创建。这减少了存在一个或多个多余槽位但无合适物品放入的情况。
- 槽位完全可自定义和操作。槽位可以拥有自定义背景、不同的大小,甚至可以默认禁用或隐藏。但是玩家如何访问禁用的槽位呢?通过 API,开发者可以使用函数来启用/禁用玩家的槽位,或添加/移除特定数量的给定类型槽位。
- 使用原版标签系统实现灵活的物品 -> 饰品关联。潜在的饰品通过原版标签系统进行选择,这意味着将物品分类为饰品类型就像在 data/curios/tags 文件夹中创建一个 .json 文件一样简单。只要物品在相应的文件中被正确标记,它们可以被归类到任意数量的饰品类型中,并且这些设置甚至可以完全覆盖。更多信息,请参阅原版标签系统。
- 与其他库存机制完全集成。修补术和诅咒将与装备在饰品槽位中的所有适用物品一起生效。此外,还为开发者提供了各种次要功能,使其更简单地将现有物品或机制集成到饰品系统中。
- 通过单一 GUI 访问。Curios 自带自己的 GUI,可从物品栏访问,显示玩家所有可用的槽位。这允许玩家在中心位置查看所有扩展的装备槽位,而无需访问不同的物品栏 GUI。然而,如果开发者愿意,他们仍然可以为他们的模组专属槽位提供自己的 GUI。GUI 的默认键绑定是 'g'。
文档
如果您是开发者,请将以下内容添加到您的 build.gradle 文件中:
repositories {
maven {
name = "OctoStudios"
url = uri("https://maven.octo-studios.com/releases")
}
}
dependencies {
implementation 'top.theillusivec4.curios:curios-neoforge:${version}'
}
将 ${version} 替换为您想要使用的 Curios 版本。
更多信息可以在 这里 找到。
Important note
This is an unofficial continuation of CuriosAPI by TheIllusiveC4 for NeoForge (in current state) and Forge (in future). Please, don't report issues of this port to TheIllusiveC4, use separated github issues page or discord invite instead. Mod description and documentation will be updated soon, so stay tuned!
Overview
Curios is a flexible and expandable accessory/equipment API for users and developers. The purpose is to provide functionality for developers to add extra accessory/equipment slots in a convenient and compatible manner, as well as to give users the ability to configure these slots to their preferences. By default, Curios does not add any content except for an inventory GUI. There are no slots and only two items, the latter only being available through the Creative menu and primarily serving as examples for developers to use when coding their own integration.
Features
- Expandable equipment slots through a central library. New equipment slots can be made and managed easily through an identifier registry. Identical identifiers will be merged together to avoid functional redundancies and provide maximum compatibility to potential items, while unique identifiers can still be used to mark special types when appropriate.
- Slots are only made on-demand. There are no slots included by default, all slots are created only as needed. This reduces instances where one or more superfluous slots are present without any suitable items to go into the slot.
- Slots are completely customizable and manipulable. Slots can have custom backgrounds, different sizes, and can even be disabled or hidden by default. But how would a player even access disabled slots? Through the API, developers can access functions to enable/disable a player's slots or add/remove a certain number of slots of a given type.
- Flexible item -> curio relations using the vanilla tag system. Potential curios are selected through the vanilla tag system, which means that categorizing items into curio types is as easy as creating a .json file in the data/curios/tags folder. Items can be categorized into as many curio types as you want as long as they're tagged in the appropriate files, and these settings can even be overridden entirely. For more information, see the vanilla tag system. Complete integration with other inventory mechanics. Mending and Curses will work with all applicable items equipped in the curio slots. There are also various minor features for developers that make it simpler to integrate their current items or mechanics into the curio system.
- Accessible from a single GUI. Curios comes with its own GUI accessible from the inventory that shows all of the available slots to a player. This allows players to see all of the extended equipment slots in a central location without needing to access different inventory GUIs. However, developers can still provide their own GUIs for their mod-specific slots if they want. The default keybinding for the GUI is 'g'.
Documentation
If you are a developer, add the following to your build.gradle file:
repositories {
maven {
name = "OctoStudios"
url = uri("https://maven.octo-studios.com/releases")
}
}
dependencies {
implementation 'top.theillusivec4.curios:curios-neoforge:${version}'
}
Replace ${version} with the version of Curios that you want to use.
More info can be found here.
下载 Curios API Continuation
下载 Curios API Continuation
下载 Curios API Continuation
下载 Curios API Continuation
下载 Curios API Continuation
下载 Curios API Continuation
下载 Curios API Continuation
下载 Curios API Continuation
下载 Curios API Continuation
下载 Curios API Continuation
- 修复了因不必要的无效化能力(caps)导致的内存泄漏问题
- 修复了某些有效物品被标记为无效的问题
- 修复了潜在的属性修改器冲突问题
- 修复了属性调整大小时的崩溃问题
- 修复了槽位修改器的同步问题
- 修复了切换装饰外观后 UI 位置重新定位的问题
- 修正了虚拟属性 RL 的样式,使其与实际属性保持一致
- 添加了槽位本地化的回退机制
- 更新了波兰语 (pl_pl) 翻译,由 Greg-21 提供
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
可定制的鞘翅模组,支持装饰纹饰、旗帜图案等更多功能!
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
AE2:一款流行的自动化与存储模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧