物品组件
✅ 特性
- 服务器端运行,不会给客户端带来任何额外负担
- 数据驱动,通过数据包实现,详见下文说明。
- 支持热重载,可通过
/reload命令即时生效。无需重启服务器或客户端,也无需重新加入世界。 - 支持模组物品及模组物品组件
- 简化整合包制作,将平衡性调整的强大功能交到你手中
❓ 我能用它做什么?
如需查看可更改内容的完整列表,请访问 Minecraft Wiki 上的数据组件格式页面。
以下列举了一些可对任意物品添加、移除或修改的内容(非穷尽列表):
- 最大堆叠数量
- 护甲、伤害与攻击速度数值
- 默认放置状态
- 附魔光泽
- 防火
- 营养值、饱和值、食用时间及效果
- 工具提示
- 名称与背景描述
- 唱片盒歌曲
- 最大耐久度
- 稀有度
- 默认挖掘速度、耐久度变化及有效方块
- 不可破坏
本质上,无论是模组物品还是原版物品,都可以按照你的意愿进行任意修改。\
⚙️ 数据包制作
可以通过在 <namespace>:item_components/<path>.json 下添加条目来更改(一个或多个)物品上的组件。
每个条目包含 3 个字段,均为可选:
parents: 一个 ID 或一组 ID- 要继承的父级条目。请注意,仅继承父级的父级以及父级的组件,而不继承父级的目标(targets)。
targets: 一个物品 ID、以 '#' 结尾的物品标签或一组物品 ID- 要应用组件更改的物品。
components: 一个组件更改对象- 要应用到这些物品的组件更改内容。
请访问 示例数据包源码。
Item Components
✅ Features
- Server-side at no cost of quirkyness on the client
- Data-driven through datapacks, read below for the how.
- Reloadable on the fly via /reload. No restarting a server or client, or rejoining a world.
- Supports modded items and modded item components
- Modpack creation made easy, by putting the power of balancing in your hands
❓ What can I do with it?
For a full list of things you can change, visit the Minecraft Wiki on Data component format.
A non-exhaustive list of things you add, remove or change on any item:
- Max stack size
- Armor, damage & attack speed values
- Default placement state
- Enchantment glint
- Fireproof
- Nutrition, saturation, eating time & effects
- Tooltips
- Name & lore
- Jukebox song
- Max damage
- Rarity
- Default mining speed, durability change & effective blocks
- Unbreakable
In essence, any item, modded or vanilla, can be changed in any way you might want.\
⚙️ Datapack creation
Components on (an) item(s) can be changed by adding an entry under <namespace>:item_components/<path>.json.
Entries have 3 fields, all optional:
parents: an ID or an array of IDs- The entries to inherit. Note that only the parent's parents and parent's components are inherited, not the parent's targets.
targets: an item ID, an item tag suffixed with '#' or an array of item IDs- The items to apply the component changes to.
components: a component changes object- The component changes to apply to the items.
下载 Item Components
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Item Components
下载 Item Components
下载 Item Components
下载 Item Components
修复 #5 堆叠数量组件在重新加载前未生效 修复 #6 依赖 RegistryOps 的编解码器数据组件类型失败
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
缓冲的原始输入和线程化的事件轮询
模组
一个用于收集生物掉落物的多区块模组。
模组
可定制的鞘翅模组,支持装饰纹饰、旗帜图案等更多功能!
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
原版世界生成优化模组
评论 0
登录后参与评分
还没有评论,来抢沙发吧