@minecraft/server / EntityInventoryComponent
Class: EntityInventoryComponent ​
Defined in: @minecraft/server/index.d.ts:10876
Defines this entity's inventory properties.
Extends ​
Properties ​
additionalSlotsPerStrength ​
readonlyadditionalSlotsPerStrength:number
Defined in: @minecraft/server/index.d.ts:10885
Remarks ​
Number of slots that this entity can gain per extra strength.
Throws ​
This property can throw when used.
canBeSiphonedFrom ​
readonlycanBeSiphonedFrom:boolean
Defined in: @minecraft/server/index.d.ts:10893
Remarks ​
If true, the contents of this inventory can be removed by a hopper.
Throws ​
This property can throw when used.
container ​
readonlycontainer:Container
Defined in: @minecraft/server/index.d.ts:10903
Remarks ​
Defines the container for this entity. The container will be undefined if the entity has been removed.
Throws ​
This property can throw when used.
containerType ​
readonlycontainerType:string
Defined in: @minecraft/server/index.d.ts:10910
Remarks ​
Type of container this entity has.
Throws ​
This property can throw when used.
entity ​
readonlyentity:Entity
Defined in: @minecraft/server/index.d.ts:9981
Remarks ​
The entity that owns this component. The entity will be undefined if it has been removed.
Throws ​
This property can throw when used.
Inherited from ​
inventorySize ​
readonlyinventorySize:number
Defined in: @minecraft/server/index.d.ts:10917
Remarks ​
Number of slots the container has.
Throws ​
This property can throw when used.
isValid ​
readonlyisValid:boolean
Defined in: @minecraft/server/index.d.ts:6234
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.
Inherited from ​
private ​
readonlyprivate:boolean
Defined in: @minecraft/server/index.d.ts:10924
Remarks ​
If true, the entity will not drop it's inventory on death.
Throws ​
This property can throw when used.
restrictToOwner ​
readonlyrestrictToOwner:boolean
Defined in: @minecraft/server/index.d.ts:10932
Remarks ​
If true, the entity's inventory can only be accessed by its owner or itself.
Throws ​
This property can throw when used.
typeId ​
readonlytypeId:string
Defined in: @minecraft/server/index.d.ts:6240
Remarks ​
Identifier of the component.
Inherited from ​
componentId ​
readonlystaticcomponentId:"minecraft:inventory"='minecraft:inventory'
Defined in: @minecraft/server/index.d.ts:10933