Skip to content

物品组件速查 ​

本页汇总中国版自定义物品所有可用的 JSON 组件,按行为包/资源包分组,方便快速查阅。每个组件标注了所属包、类型、可选参数和简要说明,点击链接跳转到详细文档。

使用方法

  • 行为包组件写在 netease_items_beh/ 目录下的物品 JSON 中
  • 资源包组件写在 netease_items_res/ 目录下的物品 JSON 中
  • 中国版使用 format_version: "1.10"

行为包组件 — 原版(minecraft:) ​

组件类型可选参数说明详细文档
minecraft:max_stack_sizeint1~64最大堆叠数量,上限 64自定义基础物品
minecraft:max_damageint0~32767耐久度上限,设置后显示耐久条自定义基础物品
minecraft:hand_equippedbooltrue / false是否竖直握持(武器持握方式)自定义基础物品
minecraft:foilbooltrue / false是否显示附魔光效自定义基础物品
minecraft:use_durationint任意正整数(tick,20tick=1秒)最大使用时长自定义基础物品
minecraft:foodobjectnutrition: 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:seedobjectcrop_result: str(方块 identifier), plant_at: array(str)(方块列表)农作物种植组件自定义基础物品
minecraft:stacked_by_databooltrue / false不同 aux 值是否分别堆叠(与耐久互斥)自定义基础物品
minecraft:tagsobjecttags: array(str),如 ["minecraft:is_food"]物品标签,用于配方匹配自定义基础物品

行为包组件 — 中国版(netease:) ​

通用组件 ​

组件类型可选参数说明详细文档
netease:allow_offhandobjectvalue: true / false是否可放入副手自定义基础物品
netease:cooldownobjectcategory: str(冷却类型名,同类型共享冷却), duration: int(tick)使用冷却时间自定义基础物品
netease:customtipsobjectvalue: str(支持 § 颜色代码)物品描述文本(显示在名称下方)自定义基础物品
netease:enchant_materialobjectvalue: true / false是否可作为附魔台材料自定义基础物品
netease:fire_resistantobjectvalue: true / false是否防火(类似下界合金)自定义基础物品
netease:fuelobjectduration: float(秒,如 3.0)燃料属性(熔炉燃烧时长)自定义基础物品
netease:compostableint0~100(百分比)堆肥成功概率自定义基础物品
netease:show_in_handobjectvalue: true / false手持时是否显示自定义基础物品
netease:render_offsetsobjectcontroller_position_adjust: [x, y, z], controller_rotation_adjust: [x, y, z], controller_scale: float右手渲染偏移自定义基础物品
netease:initial_user_dataobjectdisplay: {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:weaponweapontype: sword/pickaxe/hatchet/shovel/hoe, level: 0~4, speed: int, attack_damage: int, enchantment: int武器/工具属性自定义武器与工具
netease:armorarmordefense: int, enchantment: int, armor_slot: 0(头)/1(胸)/2(腿)/3(脚), toughness: 0~20, knockback_resistance: 0.0~1.0盔甲属性自定义盔甲
netease:eggeggentity: str(实体 identifier)生物蛋其他特殊物品
netease:ranged_weaponranged_weapon参见远程武器文档远程武器/蓄力物品自定义远程武器
netease:bucketbucket参见特殊物品文档桶其他特殊物品
netease:shieldshield参见特殊物品文档盾牌其他特殊物品
netease:projectileprojectile_item参见特殊物品文档抛射物其他特殊物品
netease:chargeablechargeablecharge_on_draw: bool, charge_complete_time: float(秒), charge_complete_event: str蓄力物品其他特殊物品
netease:fishing_hookfishing_rodhook_entity: str(鱼漂实体 identifier), line_max: int(默认32,鱼线最大长度), line_color: array(float)(RGBA 0.0~1.0)鱼竿其他特殊物品

资源包组件 ​

组件类型可选参数说明详细文档
minecraft:iconstritem_texture.json 中定义的资源名物品贴图资源名自定义基础物品
minecraft:use_animationstreat / drink / bow / block / camera / crossbow / brush使用动画自定义基础物品
minecraft:hover_text_colorstrgold / red / aqua / green / yellow / light_purple / white 等悬浮文本颜色自定义基础物品
netease:frame_anim_in_sceneobject参见 3D 物品文档手持/掉落贴图序列帧动画3D 物品
netease:frame_animationobjectframe_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
      }
    }
  }
}