物品组件速查
本页汇总中国版自定义物品所有可用的 JSON 组件,按行为包/资源包分组,方便快速查阅。每个组件标注了所属包、类型、可选参数和简要说明,点击链接跳转到详细文档。
使用方法
- 行为包组件写在
netease_items_beh/目录下的物品 JSON 中 - 资源包组件写在
netease_items_res/目录下的物品 JSON 中 - 中国版使用
format_version: "1.10"
行为包组件 — 原版(minecraft:)
| 组件 | 类型 | 可选参数 | 说明 | 详细文档 |
|---|---|---|---|---|
minecraft:max_stack_size | int | 1~64 | 最大堆叠数量,上限 64 | 自定义基础物品 |
minecraft:max_damage | int | 0~32767 | 耐久度上限,设置后显示耐久条 | 自定义基础物品 |
minecraft:hand_equipped | bool | true / false | 是否竖直握持(武器持握方式) | 自定义基础物品 |
minecraft:foil | bool | true / false | 是否显示附魔光效 | 自定义基础物品 |
minecraft:use_duration | int | 任意正整数(tick,20tick=1秒) | 最大使用时长 | 自定义基础物品 |
minecraft:food | object | nutrition: int, saturation_modifier: poor/low/normal/good/max/supernatural, can_always_eat: bool, using_converts_to: str, cooldown_type: str, cooldown_time: int, effects: array | 食物组件 | 自定义基础物品 |
minecraft:seed | object | crop_result: str(方块 identifier), plant_at: array(str)(方块列表) | 农作物种植组件 | 自定义基础物品 |
minecraft:stacked_by_data | bool | true / false | 不同 aux 值是否分别堆叠(与耐久互斥) | 自定义基础物品 |
minecraft:tags | object | tags: array(str),如 ["minecraft:is_food"] | 物品标签,用于配方匹配 | 自定义基础物品 |
行为包组件 — 中国版(netease:)
通用组件
| 组件 | 类型 | 可选参数 | 说明 | 详细文档 |
|---|---|---|---|---|
netease:allow_offhand | object | value: true / false | 是否可放入副手 | 自定义基础物品 |
netease:cooldown | object | category: str(冷却类型名,同类型共享冷却), duration: int(tick) | 使用冷却时间 | 自定义基础物品 |
netease:customtips | object | value: str(支持 § 颜色代码) | 物品描述文本(显示在名称下方) | 自定义基础物品 |
netease:enchant_material | object | value: true / false | 是否可作为附魔台材料 | 自定义基础物品 |
netease:fire_resistant | object | value: true / false | 是否防火(类似下界合金) | 自定义基础物品 |
netease:fuel | object | duration: float(秒,如 3.0) | 燃料属性(熔炉燃烧时长) | 自定义基础物品 |
netease:compostable | int | 0~100(百分比) | 堆肥成功概率 | 自定义基础物品 |
netease:show_in_hand | object | value: true / false | 手持时是否显示 | 自定义基础物品 |
netease:render_offsets | object | controller_position_adjust: [x, y, z], controller_rotation_adjust: [x, y, z], controller_scale: float | 右手渲染偏移 | 自定义基础物品 |
netease:initial_user_data | object | display: {Name, Lore, ShowInHand}, ench: [{id, lvl}], minecraft:keep_on_death: bool, minecraft:item_lock: 0/1/2 | 初始 userData | 自定义基础物品 |
特殊类型专属组件
以下组件需要搭配对应的 custom_item_type 使用:
| 组件 | 所需 custom_item_type | 可选参数 | 说明 | 详细文档 |
|---|---|---|---|---|
netease:weapon | weapon | type: sword/pickaxe/hatchet/shovel/hoe, level: 0~4, speed: int, attack_damage: int, enchantment: int | 武器/工具属性 | 自定义武器与工具 |
netease:armor | armor | defense: int, enchantment: int, armor_slot: 0(头)/1(胸)/2(腿)/3(脚), toughness: 0~20, knockback_resistance: 0.0~1.0 | 盔甲属性 | 自定义盔甲 |
netease:egg | egg | entity: str(实体 identifier) | 生物蛋 | 其他特殊物品 |
netease:ranged_weapon | ranged_weapon | 参见远程武器文档 | 远程武器/蓄力物品 | 自定义远程武器 |
netease:bucket | bucket | 参见特殊物品文档 | 桶 | 其他特殊物品 |
netease:shield | shield | 参见特殊物品文档 | 盾牌 | 其他特殊物品 |
netease:projectile | projectile_item | 参见特殊物品文档 | 抛射物 | 其他特殊物品 |
netease:chargeable | chargeable | charge_on_draw: bool, charge_complete_time: float(秒), charge_complete_event: str | 蓄力物品 | 其他特殊物品 |
netease:fishing_hook | fishing_rod | hook_entity: str(鱼漂实体 identifier), line_max: int(默认32,鱼线最大长度), line_color: array(float)(RGBA 0.0~1.0) | 鱼竿 | 其他特殊物品 |
资源包组件
| 组件 | 类型 | 可选参数 | 说明 | 详细文档 |
|---|---|---|---|---|
minecraft:icon | str | item_texture.json 中定义的资源名 | 物品贴图资源名 | 自定义基础物品 |
minecraft:use_animation | str | eat / drink / bow / block / camera / crossbow / brush | 使用动画 | 自定义基础物品 |
minecraft:hover_text_color | str | gold / red / aqua / green / yellow / light_purple / white 等 | 悬浮文本颜色 | 自定义基础物品 |
netease:frame_anim_in_scene | object | 参见 3D 物品文档 | 手持/掉落贴图序列帧动画 | 3D 物品 |
netease:frame_animation | object | frame_count: int, texture_name: str, animate_in_toolbar: bool | 蓄力物品序列帧动画 | 自定义远程武器 |
组件速写模板
最小物品定义
json
{
"format_version": "1.10",
"minecraft:item": {
"description": {
"identifier": "mymod:item_name",
"category": "items"
},
"components": {
"minecraft:max_stack_size": 64
}
}
}食物模板
json
{
"format_version": "1.10",
"minecraft:item": {
"description": {
"identifier": "mymod:food_name",
"category": "items"
},
"components": {
"minecraft:max_stack_size": 16,
"minecraft:use_duration": 32,
"minecraft:food": {
"nutrition": 4,
"saturation_modifier": "normal",
"can_always_eat": false
}
}
}
}武器模板
json
{
"format_version": "1.10",
"minecraft:item": {
"description": {
"identifier": "mymod:weapon_name",
"category": "equipment",
"custom_item_type": "weapon"
},
"components": {
"minecraft:max_stack_size": 1,
"minecraft:max_damage": 1561,
"netease:weapon": {
"type": "sword",
"level": 3,
"damage": 7
}
}
}
}