Class ListPalette
java.lang.Object
com.github.retrooper.packetevents.protocol.world.chunk.palette.ListPalette
- All Implemented Interfaces:
Palette
A palette backed by a List.
-
Constructor Summary
ConstructorDescriptionListPalette
(int bitsPerEntry) ListPalette
(int bitsPerEntry, NetStreamInput in) -
Method Summary
-
Constructor Details
-
ListPalette
public ListPalette(int bitsPerEntry) -
ListPalette
-
-
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.
-