跳转至

Item

文档版本:1.21.0.24

Minecraft items

架构

items:
{
  format_version "format_version"
  items "minecraft:item"
}
format_versionformat_version
format_version:
string
minecraft:itemitems
items:
{
  object "description" : opt
  {
    identifier "identifier"
    boolean "is_experimental" : opt
    object "menu_category" : opt
    {
      item_group "group"
      creative_category "category"
      boolean "is_hidden_in_commands" : opt
    }
  }
  object "components" : opt
  {
    minecraft:allow_off_hand "minecraft:allow_off_hand"
    minecraft:block_placer "minecraft:block_placer"
    minecraft:can_destroy_in_creative "minecraft:can_destroy_in_creative"
    minecraft:cooldown "minecraft:cooldown"
    minecraft:damage "minecraft:damage"
    minecraft:digger "minecraft:digger"
    minecraft:display_name "minecraft:display_name"
    minecraft:durability "minecraft:durability"
    minecraft:enchantable "minecraft:enchantable"
    minecraft:entity_placer "minecraft:entity_placer"
    minecraft:food "minecraft:food"
    minecraft:fuel "minecraft:fuel"
    minecraft:foil "minecraft:glint"
    minecraft:hand_equipped "minecraft:hand_equipped"
    minecraft:icon "minecraft:icon"
    minecraft:liquid_clipped "minecraft:liquid_clipped"
    minecraft:max_stack_size "minecraft:max_stack_size"
    minecraft:projectile "minecraft:projectile"
    minecraft:record "minecraft:record"
    minecraft:repairable "minecraft:repairable"
    minecraft:shooter "minecraft:shooter"
    minecraft:should_despawn "minecraft:should_despawn"
    minecraft:stacked_by_data "minecraft:stacked_by_data"
    minecraft:tags "minecraft:tags"
    minecraft: "minecraft:throwable"
    minecraft:use_animation "minecraft:use_animation"
    minecraft:use_modifiers "minecraft:use_modifiers"
    minecraft:wearable "minecraft:wearable"
    object "<any object property>" : opt
    {
    }
  }
  events "events"
}
descriptionobject
The description for this item
description
identifieridentifier
The identifier for this item. The name must include a namespace and must not use the Minecraft namespace unless overriding a Vanilla item.
identifier:
string
is_experimentalboolean
If this item is experimental, it will only be registered if the world is marked as experimental.
menu_categoryobject
The Creative Category that includes the specified item.
menu_category
groupitem_group
item_group:
string
categorycreative_category
creative_category:
string
is_hidden_in_commandsboolean
Determines whether or not this item can be used with commands. Commands can use items by default
componentsobject
The components of this item.
components
minecraft:allow_off_handminecraft:allow_off_hand
minecraft:allow_off_hand组件。The components of this item.
minecraft:block_placerminecraft:block_placer
minecraft:block_placer组件。The components of this item.
minecraft:can_destroy_in_creativeminecraft:can_destroy_in_creative
minecraft:can_destroy_in_creative组件。The components of this item.
minecraft:cooldownminecraft:cooldown
minecraft:cooldown组件。The components of this item.
minecraft:damageminecraft:damage
minecraft:damage组件。The components of this item.
minecraft:diggerminecraft:digger
minecraft:digger组件。The components of this item.
minecraft:display_nameminecraft:display_name
minecraft:display_name组件。The components of this item.
minecraft:durabilityminecraft:durability
minecraft:durability组件。The components of this item.
minecraft:enchantableminecraft:enchantable
minecraft:enchantable组件。The components of this item.
minecraft:entity_placerminecraft:entity_placer
minecraft:entity_placer组件。The components of this item.
minecraft:foodminecraft:food
minecraft:food组件。The components of this item.
minecraft:fuelminecraft:fuel
minecraft:fuel组件。The components of this item.
minecraft:glintminecraft:foil
minecraft:glint组件。The components of this item.
minecraft:hand_equippedminecraft:hand_equipped
minecraft:hand_equipped组件。The components of this item.
minecraft:iconminecraft:icon
minecraft:icon组件。The components of this item.
minecraft:liquid_clippedminecraft:liquid_clipped
minecraft:liquid_clipped组件。The components of this item.
minecraft:max_stack_sizeminecraft:max_stack_size
minecraft:max_stack_size组件。The components of this item.
minecraft:projectileminecraft:projectile
minecraft:projectile组件。The components of this item.
minecraft:recordminecraft:record
minecraft:record组件。The components of this item.
minecraft:repairableminecraft:repairable
minecraft:repairable组件。The components of this item.
minecraft:shooterminecraft:shooter
minecraft:shooter组件。The components of this item.
minecraft:should_despawnminecraft:should_despawn
minecraft:should_despawn组件。The components of this item.
minecraft:stacked_by_dataminecraft:stacked_by_data
minecraft:stacked_by_data组件。The components of this item.
minecraft:tagsminecraft:tags
minecraft:tags组件。The components of this item.
minecraft:throwableminecraft:
minecraft:throwable组件。The components of this item.
minecraft:use_animationminecraft:use_animation
minecraft:use_animation组件。The components of this item.
minecraft:use_modifiersminecraft:use_modifiers
minecraft:use_modifiers组件。The components of this item.
minecraft:wearableminecraft:wearable
minecraft:wearable组件。The components of this item.
<any object property>object
<any object property>
eventsevents
events:
{
  object "on_consume" : opt
  {
    array "sequence" : opt
    {
      object "<any array element>" : opt
      {
      }
    }
    array "randomize" : opt
    {
      object "<any array element>" : opt
      {
      }
    }
    object "run_command" : opt
    {
      array "command" : opt
      {
        string "<any array element>" : opt
      }
      string "target" : opt
    }
  }
  object "<any object property>" : opt
  {
  }
}
on_consumeobject
UNDOCUMENTED.
on_consume
sequencearray
UNDOCUMENTED.
sequence
<any array element>object
UNDOCUMENTED.
<any array element>
randomizearray
UNDOCUMENTED.
randomize
<any array element>object
UNDOCUMENTED.
<any array element>
run_commandobject
UNDOCUMENTED.
run_command
commandarray
UNDOCUMENTED.
command
<any array element>string
UNDOCUMENTED.
targetstring
UNDOCUMENTED.
<any object property>object
UNDOCUMENTED.
<any object property>