跳转至

Inventory

文档版本:1.21.0.24

Defines this entity's inventory properties.

架构

inventory:
{
  integer "additional_slots_per_strength" : opt
  boolean "can_be_siphoned_from" : opt
  string "container_type" : opt
  integer "inventory_size" : opt
  boolean "private" : opt
  boolean "restrict_to_owner" : opt
}
additional_slots_per_strengthinteger
Number of slots that this entity can gain per extra strength.
can_be_siphoned_fromboolean
If true, the contents of this inventory can be removed by a hopper.
container_typestring
Type of container this entity has. Can be horse, minecart_chest, chest_boat, minecart_hopper, inventory, container or hopper
inventory_sizeinteger
Number of slots the container has.
privateboolean
If true, only the entity can access the inventory.
restrict_to_ownerboolean
If true, the entity's inventory can only be accessed by its owner or itself.