Interface Palette
public interface Palette
Represents a palette used to store blocks and biomes.
0 is the default value.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfacestatic interfacestatic interface -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NetworkBuffer.Type<Palette> static final NetworkBuffer.Type<Palette> -
Method Summary
Modifier and TypeMethodDescriptionstatic Palettebiomes()intReturns the number of bits used per entry.static Paletteblocks()@NotNull Paletteclone()intcount()Returns the number of entries in this palette.intvoidfill(int value) intget(int x, int y, int z) voidgetAll(@NotNull Palette.EntryConsumer consumer) voidgetAllPresent(@NotNull Palette.EntryConsumer consumer) intdefault intmaxSize()Returns the maximum number of entries in this palette.static PalettenewPalette(int dimension, int maxBitsPerEntry, int bitsPerEntry) voidreplace(int x, int y, int z, @NotNull IntUnaryOperator operator) voidreplaceAll(@NotNull Palette.EntryFunction function) static NetworkBuffer.Type<Palette> serializer(int dimension, int minIndirect, int maxIndirect) voidset(int x, int y, int z, int value) voidsetAll(@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
-