Class MapPalette
java.lang.Object
com.github.retrooper.packetevents.protocol.world.chunk.palette.MapPalette
- All Implemented Interfaces:
Palette
A palette backed by a map.
-
Constructor Summary
ConstructorDescriptionMapPalette
(int bitsPerEntry) MapPalette
(int bitsPerEntry, NetStreamInput in) -
Method Summary
-
Constructor Details
-
MapPalette
public MapPalette(int bitsPerEntry) -
MapPalette
-
-
Method Details
-
size
public int size()Description copied from interface:Palette
Gets the number of block states known by this palette. -
stateToId
public int stateToId(int state) Description copied from interface:Palette
Converts 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:Palette
Converts a storage ID to a block state. If the storage ID has no mapping, it will return a block state of 0.
-