Class RebarSimpleMultiblock.VanillaBlockdataMultiblockComponent
-
- All Implemented Interfaces:
-
io.github.pylonmc.rebar.block.base.RebarSimpleMultiblock.MultiblockComponent,io.github.pylonmc.rebar.block.base.RebarSimpleMultiblock.MultiblockComponentBlockDisplay,io.github.pylonmc.rebar.block.base.RebarSimpleMultiblock.SingleGhostBlock
@JvmRecord() public final class RebarSimpleMultiblock.VanillaBlockdataMultiblockComponent extends Record implements RebarSimpleMultiblock.SingleGhostBlock, RebarSimpleMultiblock.MultiblockComponent, RebarSimpleMultiblock.MultiblockComponentBlockDisplay
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:
<pre>{@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); } </pre>
-
-
Constructor Summary
Constructors Constructor Description RebarSimpleMultiblock.VanillaBlockdataMultiblockComponent(List<BlockData> blockDatas)RebarSimpleMultiblock.VanillaBlockdataMultiblockComponent(BlockData first, BlockData materials)
-
Method Summary
Modifier and Type Method Description final List<BlockData>getBlockDatas()Booleanmatches(Block block)voidplaceDefaultBlock(Block block)Sets block to a 'default' value which matches this MultiblockComponent. UUIDspawnGhostBlock(Block block)List<BlockData>blockDataList()-
-
Method Detail
-
getBlockDatas
final List<BlockData> getBlockDatas()
-
placeDefaultBlock
void placeDefaultBlock(Block block)
Sets block to a 'default' value which matches this MultiblockComponent.
For example, if a MultiblockComponent can be grass or dirt, this should set the block to either grass or dirt
-
spawnGhostBlock
UUID spawnGhostBlock(Block block)
-
blockDataList
List<BlockData> blockDataList()
-
-
-
-