自定义物品模型
设置
本模组仅需在服务端安装——未安装此模组的客户端也能正常加入并使用所有提供的功能。如果在单人游戏中安装在客户端,同样可以正常工作。
使用方法
要查看兼容的资源包示例,请进入 教程 目录。
在铁砧上将命名牌重命名为你通常放入 minecraft:custom_model_data={strings:[]} 数组中的字符串。
应用标题为 ruby 的命名牌前的钻石:
{
count: 1,
Slot: 0b,
id: "minecraft:diamond"
}
然后,通过锻造台将此命名牌应用于该物品。
应用标题为 ruby 的命名牌后的钻石:
{
count: 1,
Slot: 0b,
id: "minecraft:diamond",
components: {
"minecraft:custom_model_data": {
strings: ["ruby"]
}
}
}
本模组还会更改此类物品(如盔甲部件和鞘翅)的 minecraft:equippable 组件。
例如,应用标题为 crown 的命名牌前的钻石头盔:
{
count: 1,
Slot: 0b,
id: "minecraft:diamond_helmet"
}
以及应用标题为 crown 的命名牌后的钻石头盔:
{
count: 1,
Slot: 0b,
id: "minecraft:diamond_helmet",
components: {
"minecraft:custom_model_data": {
strings: ["crown"]
},
"minecraft:equippable": {
equip_sound: "minecraft:item.armor.equip_diamond",
slot: "head",
asset_id: "cim:crown"
}
}
}

注意:请注意,由于原版代码的运行机制,asset_id 始终会位于 cim 命名空间下。你可以在 教程 目录中查看示例。
你不需要为物品模型使用 cim 命名空间,仅用于盔甲渲染。

许可证
本模组采用 MIT 许可证发布。欢迎学习并参考其内容以融入你自己的项目中。
Custom Item Models
Setup
This modification is only needed on the server side - clients without this mod will be able to join and use all provided functionality. It also works in singleplayer if installed on client.
Usage
To see compatible ResourcePack examples, navigate into tutorial directory.
Rename Name Tag on the Anvil into the string that you would usually put inside minecraft:custom_model_data={strings:[]} array.
Diamond before applying Name Tag with the title ruby:
{
count: 1,
Slot: 0b,
id: "minecraft:diamond"
}
Then, apply this Name Tag onto the item via Smithing Table.
Diamond after applying Name Tag with the title ruby:
{
count: 1,
Slot: 0b,
id: "minecraft:diamond",
components: {
"minecraft:custom_model_data": {
strings: ["ruby"]
}
}
}
This mod also changes minecraft:equippable component for such items as armor pieces and elytras.
for example, Diamond Helmet before applying Name Tag with the title crown:
{
count: 1,
Slot: 0b,
id: "minecraft:diamond_helmet"
}
and after applying Name Tag with the title crown:
{
count: 1,
Slot: 0b,
id: "minecraft:diamond_helmet",
components: {
"minecraft:custom_model_data": {
strings: ["crown"]
},
"minecraft:equippable": {
equip_sound: "minecraft:item.armor.equip_diamond",
slot: "head",
asset_id: "cim:crown"
}
}
}

ATTENTION: Be aware that asset_id will always be under cim namespace, due to how vanilla code operates. You can see examples in the tutorial directory.
You don't have to use cim namespace for item models, only for armor rendering.

License
This mod is available under the MIT license. Feel free to learn from it and incorporate it in your own projects.
下载 Custom Item Models
下载 Custom Item Models
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Custom Item Models
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Custom Item Models
下载 Custom Item Models
下载 Custom Item Models
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 Custom Item Models
下载 Custom Item Models
- 更新到 Minecraft 26.3
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
可定制的鞘翅模组,支持装饰纹饰、旗帜图案等更多功能!
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
适用于 MC 1.18+ 的 Effekseer 加载器
评论 0
登录后参与评分
还没有评论,来抢沙发吧