| Constructor and Description |
|---|
PaletteImpl(int valuesLength) |
PaletteImpl(int valuesLength,
int expectedPaletteLength) |
| Modifier and Type | Method and Description |
|---|---|
void |
addId(int id)
Adds a new id to the palette.
|
void |
clear()
Clears the palette.
|
int[] |
getValues() |
int |
idAt(int sectionCoordinate)
Returns the value of the given chunk coordinate.
|
int |
idByIndex(int index)
Returns the id assigned to the given palette index.
|
int |
index(int x,
int y,
int z)
Returns the packet section index of the given coordinates.
|
int |
paletteIndexAt(int packedCoordinate)
Returns the palette index of the given section index.
|
void |
replaceId(int oldId,
int newId)
Replaces an id in the palette.
|
void |
setIdAt(int sectionCoordinate,
int id)
Set a value in the chunk section.
|
void |
setIdByIndex(int index,
int id)
Assigns an id assigned to the given palette index.
|
void |
setPaletteIndexAt(int sectionCoordinate,
int index)
Sets the index of the given section coordinate.
|
int |
size()
Returns the size of the palette.
|
public PaletteImpl(int valuesLength)
public PaletteImpl(int valuesLength,
int expectedPaletteLength)
public int index(int x,
int y,
int z)
Palettepublic int idAt(int sectionCoordinate)
Palettepublic void setIdAt(int sectionCoordinate,
int id)
Palettepublic int paletteIndexAt(int packedCoordinate)
PalettepaletteIndexAt in interface PalettepackedCoordinate - section indexpublic void setPaletteIndexAt(int sectionCoordinate,
int index)
PalettesetPaletteIndexAt in interface PalettesectionCoordinate - section indexindex - palette indexpublic int size()
Palettepublic int idByIndex(int index)
Palettepublic void setIdByIndex(int index,
int id)
PalettesetIdByIndex in interface Paletteindex - palette indexid - id valuepublic void replaceId(int oldId,
int newId)
Palettepublic void addId(int id)
Palettepublic void clear()
Palette