setBlock

fun setBlock(level: Level, pos: BlockPos, state: BlockState)

Set a block at position to a specific BlockState.

Parameters

level

level to modify

pos

block position

state

BlockState to set


fun setBlock(level: Level, pos: BlockPos, block: Block)

Set a block at position using a Block type's default state.

Parameters

level

level to modify

pos

block position

block

block type to set