EntityInventoryComponent Class

Extends

Defines this entity's inventory properties.

Properties

additionalSlotsPerStrength

read-only additionalSlotsPerStrength: number;

Number of slots that this entity can gain per extra strength.

Type: number

Warning

This property can throw errors when used.

canBeSiphonedFrom

read-only canBeSiphonedFrom: boolean;

If true, the contents of this inventory can be removed by a hopper.

Type: boolean

Warning

This property can throw errors when used.

container

read-only container?: Container;

Defines the container for this entity. The container will be undefined if the entity has been removed.

Type: Container

Warning

This property can throw errors when used.

containerType

read-only containerType: string;

Type of container this entity has.

Type: string

Warning

This property can throw errors when used.

inventorySize

read-only inventorySize: number;

Number of slots the container has.

Type: number

Warning

This property can throw errors when used.

private

read-only private: boolean;

If true, the entity will not drop it's inventory on death.

Type: boolean

Warning

This property can throw errors when used.

restrictToOwner

read-only restrictToOwner: boolean;

If true, the entity's inventory can only be accessed by its owner or itself.

Type: boolean

Warning

This property can throw errors when used.

Constants

componentId

static read-only componentId = "minecraft:inventory";

Type: string