kotlin
class KattonLevelBlockEntityCollection( val level: Level )以类似 Map 的方式按位置访问关卡中的方块实体。
属性
| 属性 | 说明 |
|---|---|
level | 包含这些方块实体的 Level。 |
KattonLevelBlockEntityCollection.get
kotlin
operator fun get(blockPos: BlockPos): BlockEntity?获取方块Entity at a 位置。
KattonLevelBlockEntityCollection.set
kotlin
operator fun set(blockPos: BlockPos, blockEntity: BlockEntity)在指定位置设置一个方块实体。 方块实体自身的位置必须与目标位置一致。
KattonLevelBlockEntityCollection.set
kotlin
fun set(blockEntity: BlockEntity)在关卡中按方块实体自身的位置设置它。
