VanillaBlockdataMultiblockComponent

Represents a vanilla component of a multiblock, which can have one or more blockdatas.

If multiple blockdatas are specified, the ghost block will automatically cycle through all the given blockdatas in order.

This should be used only when you want to impose some constraints about the blockdata, for instance:

{@code
BlockData data = Material.CAMPFIRE.createBlockData("[lit=true]") // requires the campfire to be lit
new VanillaBlockdataMultiblockComponent(data);

// or if you prefer
Campfire fire = (Campfire) Material.CAMPFIRE.createBlockData();
fire.setLit(true);
new VanillaBlockdataMultiblockComponent(fire);
}

Constructors

Link copied to clipboard
constructor(first: BlockData, vararg materials: BlockData)
constructor(blockDatas: List<BlockData>)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
open override fun blockDataList(): List<BlockData>
Link copied to clipboard
open override fun matches(block: Block): Boolean
Link copied to clipboard
open override fun placeDefaultBlock(block: Block)

Sets block to a 'default' value which matches this MultiblockComponent.

Link copied to clipboard
open override fun spawnGhostBlock(block: Block): UUID