Interface Palette
public interface Palette
Represents a palette used to store blocks and biomes.
0 is the default value.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
static interface
static interface
-
Field Summary
Modifier and TypeFieldDescriptionstatic final NetworkBuffer.Type
<Palette> static final NetworkBuffer.Type
<Palette> -
Method Summary
Modifier and TypeMethodDescriptionstatic Palette
biomes()
int
Returns the number of bits used per entry.static Palette
blocks()
@NotNull Palette
clone()
int
count()
Returns the number of entries in this palette.int
void
fill
(int value) int
get
(int x, int y, int z) void
getAll
(@NotNull Palette.EntryConsumer consumer) void
getAllPresent
(@NotNull Palette.EntryConsumer consumer) int
default int
maxSize()
Returns the maximum number of entries in this palette.static Palette
newPalette
(int dimension, int maxBitsPerEntry, int bitsPerEntry) void
replace
(int x, int y, int z, @NotNull IntUnaryOperator operator) void
replaceAll
(@NotNull Palette.EntryFunction function) static NetworkBuffer.Type
<Palette> serializer
(int dimension, int minIndirect, int maxIndirect) void
set
(int x, int y, int z, int value) void
setAll
(@NotNull Palette.EntrySupplier supplier)
-
Field Details
-
BLOCK_SERIALIZER
-
BIOME_SERIALIZER
-
-
Method Details
-
blocks
-
biomes
-
newPalette
-
get
int get(int x, int y, int z) -
getAll
-
getAllPresent
-
set
void set(int x, int y, int z, int value) -
fill
void fill(int value) -
setAll
-
replace
-
replaceAll
-
count
int count()Returns the number of entries in this palette. -
bitsPerEntry
int bitsPerEntry()Returns the number of bits used per entry. -
maxBitsPerEntry
int maxBitsPerEntry() -
dimension
int dimension() -
maxSize
default int maxSize()Returns the maximum number of entries in this palette. -
clone
-
serializer
-