BetaPrivateconstructorReadonlyblockThis property can't be read in early-execution mode.
ReadonlyisReturns 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.
This property can't be read in early-execution mode.
ReadonlytypeThis property can't be read in early-execution mode.
Static ReadonlycomponentAn array of BlockEntityStorageInfo values containing the unique ID and definition ID of each stored entity. Returns an empty array when no entities are stored by the current content pack.
Returns information about the entities stored in this block's entity storage. The returned entities are not present in the world while they are stored. Only entities stored by the current content pack are included.
Throws if the block entity is invalid or the block's location is not loaded or is outside the world boundaries.
Error
This function can't be called in early-execution mode.
The unique ID of the stored entity. Use the value returned
by BlockEntityStorageComponent.store or the
uniqueId property from BlockEntityStorageInfo.
The released Entity. The released entity receives a new runtime ID.
Releases a stored entity from this block's entity storage and spawns it back into the world, at the same location it was when stored.
Throws if the entity ID is invalid or does not identify an entity stored by the current content pack, if the stored entity cannot be loaded or spawned, or if the block entity is invalid.
Error
This function can't be called in early-execution mode.
The number of entities stored by the current content pack.
Returns the number of entities stored in this block's entity storage by the current content pack.
Throws if the block entity is invalid or the block's location is not loaded or is outside the world boundaries.
Error
This function can't be called in early-execution mode.
The unique ID assigned to the stored entity. Keep this ID to release, transfer, or inspect the stored entity later.
Serializes and stores an entity in this block's entity storage. The entity is removed from the world after it is stored. Only non-player mob entities can be stored. Entities with passengers or that are passengers cannot be stored.
Throws if the storage is full, the entity is already stored, the entity cannot be serialized, or the block entity is invalid.
Error
This function can't be called in early-execution mode.
The unique ID of the stored entity. Use the value returned
by BlockEntityStorageComponent.store or the
uniqueId property from BlockEntityStorageInfo.
The target Block with an entity storage component. The target block must be in the same dimension as this block.
Moves a stored entity from this block's entity storage to the target block's entity storage without releasing it into the world.
Throws if the entity ID is invalid or not stored by the current content pack, if the target block is invalid, in another dimension, lacks entity storage, or is full, or if the source and target blocks are the same.
Error
This function can't be called in early-execution mode.
Represents storage for entities associated with a block entity. This component is available on blocks whose behavior pack definition enables entity storage with the
minecraft:block_entitycomponent. Stored entities are serialized and removed from the world until they are released or transferred. A block can store up to four entities. Entity storage is scoped to the content pack accessing it.Source