@minecraft
    正在准备搜索索引...

    类 BlockEntityStorageComponent实验性

    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_entity component. 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.

    层级 (查看层级一览)

    索引
    block: Block

    Block instance that this component pertains to.

    isValid: boolean

    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.

    typeId: string

    Identifier of the component.

    componentId: "minecraft:entity_storage" = 'minecraft:entity_storage'
    • 世界修改

      参数

      返回 string

      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

      InvalidBlockComponentError

      LocationInUnloadedChunkError

      LocationOutOfWorldBoundariesError