Class GlobalPalette
java.lang.Object
org.geysermc.mcprotocollib.protocol.data.game.chunk.palette.GlobalPalette
- All Implemented Interfaces:
Palette
A global palette that maps 1:1.
-
Field Summary
Fields -
Constructor Summary
Constructors -
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.
-
Field Details
-
INSTANCE
-
-
Constructor Details
-
GlobalPalette
public GlobalPalette()
-
-
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()
-