kotlin
class KattonLevelBlockEntityCollection( val level: Level )Map-like access to block entities in a level by position.
Properties
| Property | Description |
|---|---|
level | The Level containing the block entities |
KattonLevelBlockEntityCollection.get
kotlin
operator fun get(blockPos: BlockPos): BlockEntity?Get the BlockEntity at a position.
KattonLevelBlockEntityCollection.set
kotlin
operator fun set(blockPos: BlockPos, blockEntity: BlockEntity)Set a BlockEntity at a specific position.
The block entity's position must match the target position.
KattonLevelBlockEntityCollection.set
kotlin
fun set(blockEntity: BlockEntity)Set a BlockEntity in the level at its own position.