place Block
fun placeBlock(block: Block, key: NamespacedKey, context: BlockCreateContext = BlockCreateContext.Default(block)): RebarBlock?(source)
Creates a new Rebar block. Only call on the main thread.
Return
The block that was placed, or null if the block placement was cancelled
Throws
fun placeBlock(location: Location, key: NamespacedKey, context: BlockCreateContext = BlockCreateContext.Default(location.block)): RebarBlock?(source)
Creates a new Rebar block. Only call on the main thread.
Return
The block that was placed, or null if the block placement was cancelled
Throws
fun placeBlock(blockPosition: BlockPosition, key: NamespacedKey, context: BlockCreateContext = BlockCreateContext.Default(blockPosition.block)): RebarBlock?(source)
Creates a new Rebar block. Only call on the main thread.
Return
The block that was placed, or null if the block placement was cancelled
Throws
if the chunk of the given blockPosition is not loaded, the block already contains a Rebar block, or the block type given by key does not exist.