Class EntityInventoryComponent

Defines this entity's inventory properties.

Hierarchy

Constructors

Properties

additionalSlotsPerStrength: number

Remarks

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

Throws

This property can throw when used.

canBeSiphonedFrom: boolean

Remarks

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

Throws

This property can throw when used.

container: Container

Remarks

Defines the container for this entity.

Throws

This property can throw when used.

containerType: string

Remarks

Type of container this entity has.

Throws

This property can throw when used.

entity: Entity

Remarks

The entity that owns this component.

inventorySize: number

Remarks

Number of slots the container has.

Throws

This property can throw when used.

private: boolean

Remarks

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

Throws

This property can throw when used.

restrictToOwner: boolean

Remarks

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

Throws

This property can throw when used.

typeId: string

Remarks

Identifier of the component.

componentId: "minecraft:inventory" = 'minecraft:inventory'

Methods

  • Beta

    Returns boolean

    Whether the component is valid.

    Remarks

    Returns whether the component is valid. A component is considered valid if its owner is valid, in addition to any addition to any additional validation required by the component.