1. Wiki
  2. /Entities
  3. /minecraft:inventory

minecraft:inventory

Don't want to write this by hand? GodCraft sets minecraft:inventory for you with a switch.Get GodCraft

Overview

minecraft:inventory is an entity component: it goes in the components object of a custom mob, or in one of its component groups. Gives the entity an inventory that can hold items, like a chest on a donkey or a minecart.

Fields

FieldTypeDefaultDescription
additional_slots_per_strengthInteger"0"Extra slots gained for each point of strength.
can_be_siphoned_fromBoolean"false"Lets hoppers pull items out of it.
container_typeString"none"Kind of container screen, such as horse, inventory, container or hopper.
inventory_sizeInteger"5"Number of slots.
privateBoolean"false"If true, items are not dropped when the entity dies.
restrict_to_ownerBoolean"false"Only the owner can open the inventory.

Example

Inside the components object of BP/entities/<name>.json (values are the defaults or placeholders):

BP/entities/<name>.json
{
  "minecraft:inventory": {
    "additional_slots_per_strength": "0",
    "can_be_siphoned_from": "false",
    "container_type": "none",
    "inventory_size": "5",
    "private": "false",
    "restrict_to_owner": "false"
  }
}

We use cookies to improve your experience and analyse site traffic. Learn more