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 official dbh$dintermediary net/minecraft/class_2841$class_6563named net/minecraft/world/chunk/PalettedContainer$PaletteProvider
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Palette.Factorystatic final Palette.Factorystatic final PalettedContainer.PaletteProviderA palette provider that stores64objects in a container.static final PalettedContainer.PaletteProviderA palette provider that stores4096objects in a container.private final int(package private) static final Palette.Factorystatic final Palette.Factory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintcomputeIndex(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 withbitssize in the storage.(package private) <A> intgetBits(IndexedIterable<A> idList, int size) intReturns the size of the container's data desired by this provider.
-
Field Details
-
SINGULAR
- Mappings:
Namespace Name Mixin selector official aLdbh$d;a:Ldbf$a;intermediary field_34566Lnet/minecraft/class_2841$class_6563;field_34566:Lnet/minecraft/class_2837$class_6559;named SINGULARLnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;SINGULAR:Lnet/minecraft/world/chunk/Palette$Factory;
-
ARRAY
- Mappings:
Namespace Name Mixin selector official bLdbh$d;b:Ldbf$a;intermediary field_34567Lnet/minecraft/class_2841$class_6563;field_34567:Lnet/minecraft/class_2837$class_6559;named ARRAYLnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;ARRAY:Lnet/minecraft/world/chunk/Palette$Factory;
-
BI_MAP
- Mappings:
Namespace Name Mixin selector official cLdbh$d;c:Ldbf$a;intermediary field_34568Lnet/minecraft/class_2841$class_6563;field_34568:Lnet/minecraft/class_2837$class_6559;named BI_MAPLnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;BI_MAP:Lnet/minecraft/world/chunk/Palette$Factory;
-
ID_LIST
- Mappings:
Namespace Name Mixin selector official fLdbh$d;f:Ldbf$a;intermediary field_34571Lnet/minecraft/class_2841$class_6563;field_34571:Lnet/minecraft/class_2837$class_6559;named ID_LISTLnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;ID_LIST:Lnet/minecraft/world/chunk/Palette$Factory;
-
BLOCK_STATE
A palette provider that stores4096objects in a container. Used in vanilla by block states in a chunk section.- Mappings:
Namespace Name Mixin selector official dLdbh$d;d:Ldbh$d;intermediary field_34569Lnet/minecraft/class_2841$class_6563;field_34569:Lnet/minecraft/class_2841$class_6563;named BLOCK_STATELnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;BLOCK_STATE:Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;
-
BIOME
A palette provider that stores64objects in a container. Used in vanilla by biomes in a chunk section.- Mappings:
Namespace Name Mixin selector official eLdbh$d;e:Ldbh$d;intermediary field_34570Lnet/minecraft/class_2841$class_6563;field_34570:Lnet/minecraft/class_2841$class_6563;named BIOMELnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;BIOME:Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;
-
edgeBits
private final int edgeBits- Mappings:
Namespace Name Mixin selector official gLdbh$d;g:Iintermediary field_34572Lnet/minecraft/class_2841$class_6563;field_34572:Inamed edgeBitsLnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;edgeBits:I
-
-
Constructor Details
-
PaletteProvider
PaletteProvider(int edgeBits) - Mappings:
Namespace Name Mixin selector official <init>Ldbh$d;<init>(I)Vintermediary <init>Lnet/minecraft/class_2841$class_6563;<init>(I)Vnamed <init>Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;<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 official aLdbh$d;a()Iintermediary method_38312Lnet/minecraft/class_2841$class_6563;method_38312()Inamed getContainerSizeLnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;getContainerSize()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 official aLdbh$d;a(III)Iintermediary method_38313Lnet/minecraft/class_2841$class_6563;method_38313(III)Inamed computeIndexLnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;computeIndex(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 withbitssize 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 official aLdbh$d;a(Lhe;I)Ldbh$a;intermediary method_38314Lnet/minecraft/class_2841$class_6563;method_38314(Lnet/minecraft/class_2359;I)Lnet/minecraft/class_2841$class_6560;named createDataProviderLnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;createDataProvider(Lnet/minecraft/util/collection/IndexedIterable;I)Lnet/minecraft/world/chunk/PalettedContainer$DataProvider;
-
getBits
- Mappings:
Namespace Name Mixin selector official bLdbh$d;b(Lhe;I)Iintermediary method_38315Lnet/minecraft/class_2841$class_6563;method_38315(Lnet/minecraft/class_2359;I)Inamed getBitsLnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;getBits(Lnet/minecraft/util/collection/IndexedIterable;I)I
-