Skip to content
On this page

Common

KattonBlockApi

top.katton.api.dpcallercommon/src/main/kotlin/top/katton/api/dpcaller/KattonBlockApi.kt
Map-like access to blocks in a level by position.

KattonLevelBlockCollection

CommonClass
kotlin
class KattonLevelBlockCollection( val level: Level )

Map-like access to blocks in a level by position.

Properties

PropertyDescription
levelThe Level containing the blocks

KattonLevelBlockCollection.get

CommonFunction
kotlin
operator fun get(blockPos: BlockPos): Block

Get the Block at a position.

KattonLevelBlockCollection.set

CommonFunction
kotlin
operator fun set(blockPos: BlockPos, block: Block)

Set a Block at a position using its default state.

KattonLevelBlockCollection.set

CommonFunction
kotlin
operator fun set(start: BlockPos, end: BlockPos, block: Block)

Fill a region with a Block using its default state.

KattonLevelBlockStateCollection

CommonClass
kotlin
class KattonLevelBlockStateCollection( val level: Level )

Map-like access to block states in a level by position.

Properties

PropertyDescription
levelThe Level containing the blocks

KattonLevelBlockStateCollection.get

CommonFunction
kotlin
operator fun get(blockPos: BlockPos): BlockState

Get the BlockState at a position.

KattonLevelBlockStateCollection.set

CommonFunction
kotlin
operator fun set(blockPos: BlockPos, blockState: BlockState)

Set a BlockState at a position.

KattonLevelBlockStateCollection.set

CommonFunction
kotlin
operator fun set(start: BlockPos, end: BlockPos, blockState: BlockState)

Fill a region with a BlockState.