Package net.minecraft.world.chunk
Class PalettedContainer.PaletteProvider
java.lang.Object
net.minecraft.world.chunk.PalettedContainer.PaletteProvider
- Enclosing class:
PalettedContainer<T>
A palette provider determines what type of palette to choose given the
bits used to represent each element. In addition, it controls how the
data in the serialized container is read based on the palette given.
- Mappings:
Namespace Name named net/minecraft/world/chunk/PalettedContainer$PaletteProvider
intermediary net/minecraft/class_2841$class_6563
official dur$d
-
Field Summary
Modifier and TypeFieldDescriptionstatic final Palette.Factory
static final Palette.Factory
static final PalettedContainer.PaletteProvider
A palette provider that stores64
objects in a container.static final PalettedContainer.PaletteProvider
A palette provider that stores4096
objects in a container.private final int
(package private) static final Palette.Factory
static final Palette.Factory
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
computeIndex
(int x, int y, int z) Returns the index of an object in the storage given its x, y, z coordinates.abstract <A> PalettedContainer.DataProvider
<A> createDataProvider
(IndexedIterable<A> idList, int bits) Creates a data provider that is suitable to represent objects withbits
size in the storage.(package private) <A> int
getBits
(IndexedIterable<A> idList, int size) int
Returns the size of the container's data desired by this provider.
-
Field Details
-
SINGULAR
- Mappings:
Namespace Name Mixin selector named SINGULAR
Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;SINGULAR:Lnet/minecraft/world/chunk/Palette$Factory;
intermediary field_34566
Lnet/minecraft/class_2841$class_6563;field_34566:Lnet/minecraft/class_2837$class_6559;
official a
Ldur$d;a:Ldup$a;
-
ARRAY
- Mappings:
Namespace Name Mixin selector named ARRAY
Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;ARRAY:Lnet/minecraft/world/chunk/Palette$Factory;
intermediary field_34567
Lnet/minecraft/class_2841$class_6563;field_34567:Lnet/minecraft/class_2837$class_6559;
official b
Ldur$d;b:Ldup$a;
-
BI_MAP
- Mappings:
Namespace Name Mixin selector named BI_MAP
Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;BI_MAP:Lnet/minecraft/world/chunk/Palette$Factory;
intermediary field_34568
Lnet/minecraft/class_2841$class_6563;field_34568:Lnet/minecraft/class_2837$class_6559;
official c
Ldur$d;c:Ldup$a;
-
ID_LIST
- Mappings:
Namespace Name Mixin selector named ID_LIST
Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;ID_LIST:Lnet/minecraft/world/chunk/Palette$Factory;
intermediary field_34571
Lnet/minecraft/class_2841$class_6563;field_34571:Lnet/minecraft/class_2837$class_6559;
official f
Ldur$d;f:Ldup$a;
-
BLOCK_STATE
A palette provider that stores4096
objects in a container. Used in vanilla by block states in a chunk section.- Mappings:
Namespace Name Mixin selector named BLOCK_STATE
Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;BLOCK_STATE:Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;
intermediary field_34569
Lnet/minecraft/class_2841$class_6563;field_34569:Lnet/minecraft/class_2841$class_6563;
official d
Ldur$d;d:Ldur$d;
-
BIOME
A palette provider that stores64
objects in a container. Used in vanilla by biomes in a chunk section.- Mappings:
Namespace Name Mixin selector named BIOME
Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;BIOME:Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;
intermediary field_34570
Lnet/minecraft/class_2841$class_6563;field_34570:Lnet/minecraft/class_2841$class_6563;
official e
Ldur$d;e:Ldur$d;
-
edgeBits
private final int edgeBits- Mappings:
Namespace Name Mixin selector named edgeBits
Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;edgeBits:I
intermediary field_34572
Lnet/minecraft/class_2841$class_6563;field_34572:I
official g
Ldur$d;g:I
-
-
Constructor Details
-
PaletteProvider
PaletteProvider(int edgeBits) - Mappings:
Namespace Name Mixin selector named <init>
Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;<init>(I)V
intermediary <init>
Lnet/minecraft/class_2841$class_6563;<init>(I)V
official <init>
Ldur$d;<init>(I)V
-
-
Method Details
-
getContainerSize
public int getContainerSize()Returns the size of the container's data desired by this provider.- Returns:
- the size of the container's data desired by this provider
- Mappings:
Namespace Name Mixin selector named getContainerSize
Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;getContainerSize()I
intermediary method_38312
Lnet/minecraft/class_2841$class_6563;method_38312()I
official a
Ldur$d;a()I
-
computeIndex
public int computeIndex(int x, int y, int z) Returns the index of an object in the storage given its x, y, z coordinates.- Parameters:
x
- the x coordinatey
- the y coordinatez
- the z coordinate- Returns:
- the index of an object in the storage given its x, y, z coordinates
- Mappings:
Namespace Name Mixin selector named computeIndex
Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;computeIndex(III)I
intermediary method_38313
Lnet/minecraft/class_2841$class_6563;method_38313(III)I
official a
Ldur$d;a(III)I
-
createDataProvider
public abstract <A> PalettedContainer.DataProvider<A> createDataProvider(IndexedIterable<A> idList, int bits) Creates a data provider that is suitable to represent objects withbits
size in the storage.- Parameters:
idList
- the id list that maps between objects and full integer IDsbits
- the number of bits needed to represent all palette entries- Returns:
- the data provider
- Mappings:
Namespace Name Mixin selector named createDataProvider
Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;createDataProvider(Lnet/minecraft/util/collection/IndexedIterable;I)Lnet/minecraft/world/chunk/PalettedContainer$DataProvider;
intermediary method_38314
Lnet/minecraft/class_2841$class_6563;method_38314(Lnet/minecraft/class_2359;I)Lnet/minecraft/class_2841$class_6560;
official a
Ldur$d;a(Ljn;I)Ldur$a;
-
getBits
- Mappings:
Namespace Name Mixin selector named getBits
Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;getBits(Lnet/minecraft/util/collection/IndexedIterable;I)I
intermediary method_38315
Lnet/minecraft/class_2841$class_6563;method_38315(Lnet/minecraft/class_2359;I)I
official b
Ldur$d;b(Ljn;I)I
-