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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for