If added onto the entity, this indicates that the entity
represents a free-floating item in the world. Lets you
retrieve the actual item stack contents via the itemStack
property.
Item stack represented by this entity in the world.
抛出
This property can throw when used.
只读实验性typeId
typeId:string
备注
Identifier of the component.
静态只读实验性componentId
componentId:"minecraft:item" = 'minecraft:item'
方法
isValid
isValid(): boolean
实验性
返回 boolean
Whether the component is valid.
备注
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.
If added onto the entity, this indicates that the entity represents a free-floating item in the world. Lets you retrieve the actual item stack contents via the itemStack property.
示例: testThatEntityIsFeatherItem.ts