Class MapPalette
java.lang.Object
org.geysermc.mcprotocollib.protocol.data.game.chunk.palette.MapPalette
- All Implemented Interfaces:
Palette
A palette backed by a map.
-
Constructor Summary
ConstructorsConstructorDescriptionMapPalette(int bitsPerEntry) MapPalette(int bitsPerEntry, io.netty.buffer.ByteBuf in, MinecraftCodecHelper helper) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleancopy()Creates a copy of this palette.booleaninthashCode()intidToState(int id) Converts a storage ID to a block state.intsize()Gets the number of block states known by this palette.intstateToId(int state) Converts a block state to a storage ID.
-
Constructor Details
-
MapPalette
public MapPalette(int bitsPerEntry) -
MapPalette
-
-
Method Details
-
size
public int size()Description copied from interface:PaletteGets the number of block states known by this palette. -
stateToId
public int stateToId(int state) Description copied from interface:PaletteConverts a block state to a storage ID. If the state has not been mapped, the palette will attempt to map it, returning -1 if it cannot. -
idToState
public int idToState(int id) Description copied from interface:PaletteConverts a storage ID to a block state. If the storage ID has no mapping, it will return a block state of 0. -
copy
Description copied from interface:PaletteCreates a copy of this palette. This performs a deep copy of the palette's internal data. -
equals
-
canEqual
-
hashCode
public int hashCode()
-