Item Server Definition¶
文档版本:1.21.0.24
The minecraft item server definition file, defining a item's behavior.
架构¶
format_version
:format_version
<any array element>
:integer
minecraft:item
:minecraft:item
minecraft:item:
{
object "description" : opt
{
string "identifier" : opt
string "category" : opt
object "menu_category" : opt
{
string "category" : opt
string "group" : opt
boolean "is_hidden_in_commands" : opt
}
string "custom_item_type" : opt
boolean "register_to_create_menu" : opt
}
object "components" : opt
{
minecraft:max_damage "minecraft:max_damage"
minecraft:seed "minecraft:seed"
minecraft:camera "minecraft:camera"
minecraft:block "minecraft:block"
minecraft:can_destroy_in_creative "minecraft:can_destroy_in_creative"
minecraft:max_stack_size "minecraft:max_stack_size"
minecraft:hover_text_color "minecraft:hover_text_color"
minecraft:stacked_by_data "minecraft:stacked_by_data"
minecraft:hand_equipped "minecraft:hand_equipped"
minecraft:liquid_clipped "minecraft:liquid_clipped"
minecraft:allow_off_hand "minecraft:allow_off_hand"
minecraft:damage "minecraft:damage"
minecraft:should_despawn "minecraft:should_despawn"
minecraft:use_animation "minecraft:use_animation"
minecraft:use_duration "minecraft:use_duration"
minecraft:use_modifiers "minecraft:use_modifiers"
minecraft:foil "minecraft:foil"
minecraft:mining_speed "minecraft:mining_speed"
minecraft:enchantable "minecraft:enchantable"
minecraft:frame_count "minecraft:frame_count"
minecraft:creative_category "minecraft:creative_category"
minecraft:render_offsets "minecraft:render_offsets"
minecraft:glint "minecraft:glint"
minecraft:interact_button "minecraft:interact_button"
minecraft:icon "minecraft:icon"
minecraft:armor "minecraft:armor"
minecraft:item_storage "minecraft:item_storage"
minecraft:chargeable "minecraft:chargeable"
minecraft:cooldown "minecraft:cooldown"
minecraft:durability "minecraft:durability"
minecraft:digger "minecraft:digger"
minecraft:display_name "minecraft:display_name"
minecraft:entity_placer "minecraft:entity_placer"
minecraft:food "minecraft:food"
minecraft:fuel "minecraft:fuel"
minecraft:on_use "minecraft:on_use"
minecraft:on_use_on "minecraft:on_use_on"
minecraft:block_placer "minecraft:block_placer"
minecraft:projectile "minecraft:projectile"
minecraft:repairable "minecraft:repairable"
minecraft:shooter "minecraft:shooter"
minecraft:throwable "minecraft:throwable"
minecraft:weapon "minecraft:weapon"
minecraft:wearable "minecraft:wearable"
minecraft:record "minecraft:record"
minecraft:custom_components "minecraft:custom_components"
minecraft:tags "minecraft:tags"
netease:show_in_hand "netease:show_in_hand"
netease:fire_resistant "netease:fire_resistant"
netease:allow_offhand "netease:allow_offhand"
netease:enchant_material "netease:enchant_material"
netease:fuel "netease:fuel"
netease:cooldown "netease:cooldown"
netease:customtips "netease:customtips"
object "^tag:[a-zA-Z0-9_.:-]+$" : opt
{
}
object "^[a-zA-Z0-9_.:-]+$" : opt
{
}
}
object "events" : opt
{
"on_fertilized" : opt
definition_event "on_tool_used"
definition_event "<any object property>"
}
}
description
:object- The item description.
description
identifier
:string- The item identifier.
category
:string
menu_category
:object
menu_category
category
:string
group
:string
is_hidden_in_commands
:boolean
custom_item_type
:string- 我的世界中国版自定义物品类别,请勿在国际版上使用。
register_to_create_menu
:boolean- 是否注册到创造栏。我的世界中国版自定义物品注册属性,请勿在国际版上使用。
components
:object
components
minecraft:max_damage
:minecraft:max_damageminecraft:max_damage
组件。
minecraft:seed
:minecraft:seedminecraft:seed
组件。
minecraft:camera
:minecraft:cameraminecraft:camera
组件。
minecraft:block
:minecraft:blockminecraft:block
组件。
minecraft:can_destroy_in_creative
:minecraft:can_destroy_in_creativeminecraft:can_destroy_in_creative
组件。
minecraft:max_stack_size
:minecraft:max_stack_sizeminecraft:max_stack_size
组件。
minecraft:hover_text_color
:minecraft:hover_text_colorminecraft:hover_text_color
组件。
minecraft:stacked_by_data
:minecraft:stacked_by_dataminecraft:stacked_by_data
组件。
minecraft:hand_equipped
:minecraft:hand_equippedminecraft:hand_equipped
组件。
minecraft:liquid_clipped
:minecraft:liquid_clippedminecraft:liquid_clipped
组件。
minecraft:allow_off_hand
:minecraft:allow_off_handminecraft:allow_off_hand
组件。
minecraft:damage
:minecraft:damageminecraft:damage
组件。
minecraft:should_despawn
:minecraft:should_despawnminecraft:should_despawn
组件。
minecraft:use_animation
:minecraft:use_animationminecraft:use_animation
组件。
minecraft:use_duration
:minecraft:use_durationminecraft:use_duration
组件。
minecraft:use_modifiers
:minecraft:use_modifiersminecraft:use_modifiers
组件。
minecraft:foil
:minecraft:foilminecraft:foil
组件。
minecraft:mining_speed
:minecraft:mining_speedminecraft:mining_speed
组件。
minecraft:enchantable
:minecraft:enchantableminecraft:enchantable
组件。
minecraft:frame_count
:minecraft:frame_countminecraft:frame_count
组件。
minecraft:creative_category
:minecraft:creative_categoryminecraft:creative_category
组件。
minecraft:render_offsets
:minecraft:render_offsetsminecraft:render_offsets
组件。
minecraft:glint
:minecraft:glintminecraft:glint
组件。
minecraft:interact_button
:minecraft:interact_buttonminecraft:interact_button
组件。
minecraft:icon
:minecraft:iconminecraft:icon
组件。
minecraft:armor
:minecraft:armorminecraft:armor
组件。
minecraft:item_storage
:minecraft:item_storageminecraft:item_storage
组件。
minecraft:chargeable
:minecraft:chargeableminecraft:chargeable
组件。
minecraft:cooldown
:minecraft:cooldownminecraft:cooldown
组件。
minecraft:durability
:minecraft:durabilityminecraft:durability
组件。
minecraft:digger
:minecraft:diggerminecraft:digger
组件。
minecraft:display_name
:minecraft:display_nameminecraft:display_name
组件。
minecraft:entity_placer
:minecraft:entity_placerminecraft:entity_placer
组件。
minecraft:food
:minecraft:foodminecraft:food
组件。
minecraft:fuel
:minecraft:fuelminecraft:fuel
组件。
minecraft:on_use
:minecraft:on_useminecraft:on_use
组件。
minecraft:on_use_on
:minecraft:on_use_onminecraft:on_use_on
组件。
minecraft:block_placer
:minecraft:block_placerminecraft:block_placer
组件。
minecraft:projectile
:minecraft:projectileminecraft:projectile
组件。
minecraft:repairable
:minecraft:repairableminecraft:repairable
组件。
minecraft:shooter
:minecraft:shooterminecraft:shooter
组件。
minecraft:throwable
:minecraft:throwableminecraft:throwable
组件。
minecraft:weapon
:minecraft:weaponminecraft:weapon
组件。
minecraft:wearable
:minecraft:wearableminecraft:wearable
组件。
minecraft:record
:minecraft:recordminecraft:record
组件。
minecraft:custom_components
:minecraft:custom_componentsminecraft:custom_components
组件。
minecraft:tags
:minecraft:tagsminecraft:tags
组件。
netease:show_in_hand
:netease:show_in_handnetease:show_in_hand
组件。
netease:fire_resistant
:netease:fire_resistantnetease:fire_resistant
组件。
netease:allow_offhand
:netease:allow_offhandnetease:allow_offhand
组件。
netease:enchant_material
:netease:enchant_materialnetease:enchant_material
组件。
netease:fuel
:netease:fuelnetease:fuel
组件。
netease:cooldown
:netease:cooldownnetease:cooldown
组件。
netease:customtips
:netease:customtipsnetease:customtips
组件。
^tag:[a-zA-Z0-9_.:-]+$
:object
^tag:[a-zA-Z0-9_.:-]+$
^[a-zA-Z0-9_.:-]+$
:object
^[a-zA-Z0-9_.:-]+$
events
:object
events
on_fertilized
on_tool_used
:definition_event
definition_event:
{
number "weight" : opt
expression_node_no_version "condition"
array "randomize" : opt
{
object "<any array element>" : opt
{
}
}
array "sequence" : opt
{
object "<any array element>" : opt
{
}
}
definition_trigger_no_condition "trigger"
}
weight
:number
condition
:expression_node_no_version
randomize
:array
randomize
<any array element>
:object
<any array element>
sequence
:array
sequence
<any array element>
:object
<any array element>
trigger
:definition_trigger_no_condition
event
:string
target
:string
<any object property>
:definition_event