BlockPalette

class BlockPalette : Palette<BlockState>

Constructors

BlockPalette
Link copied to clipboard
fun BlockPalette(elements: NBTList<NBTCompound>)

Functions

compactIDs
Link copied to clipboard
fun compactIDs(states: Array<BlockState>, version: SupportedVersion = SupportedVersion.Latest, minimumBitSize: Int = 1): ImmutableLongArray
Produces a long array with the compacted IDs based on this palette.
decreaseReference
Link copied to clipboard
fun decreaseReference(block: BlockState)
Decreases the number of references to the given element.
increaseReference
Link copied to clipboard
fun increaseReference(block: BlockState)
Increases the reference count of the given element.
isEmpty
Link copied to clipboard
fun isEmpty(): Boolean
Returns true iif the only referenced block inside this palette is "minecraft:air"
toNBT
Link copied to clipboard
fun toNBT(): NBTList<NBT>
Converts this Palette into its NBT representation

Properties

elements
Link copied to clipboard
val elements: MutableList<BlockState>