Class PalettedContainer.PaletteProvider

java.lang.Object
net.minecraft.world.chunk.PalettedContainer.PaletteProvider
Enclosing class:
PalettedContainer<T>

public abstract static class PalettedContainer.PaletteProvider extends Object
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 cqp$e
intermediary net/minecraft/class_2841$class_6563
named net/minecraft/world/chunk/PalettedContainer$PaletteProvider
  • Field Details

    • SINGULAR

      public static final Palette.Factory SINGULAR
      Mappings:
      Namespace Name Mixin selector
      official a Lcqp$e;a:Lcqn$a;
      intermediary field_34566 Lnet/minecraft/class_2841$class_6563;field_34566:Lnet/minecraft/class_2837$class_6559;
      named SINGULAR Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;SINGULAR:Lnet/minecraft/world/chunk/Palette$Factory;
    • ARRAY

      public static final Palette.Factory ARRAY
      Mappings:
      Namespace Name Mixin selector
      official b Lcqp$e;b:Lcqn$a;
      intermediary field_34567 Lnet/minecraft/class_2841$class_6563;field_34567:Lnet/minecraft/class_2837$class_6559;
      named ARRAY Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;ARRAY:Lnet/minecraft/world/chunk/Palette$Factory;
    • BI_MAP

      public static final Palette.Factory BI_MAP
      Mappings:
      Namespace Name Mixin selector
      official c Lcqp$e;c:Lcqn$a;
      intermediary field_34568 Lnet/minecraft/class_2841$class_6563;field_34568:Lnet/minecraft/class_2837$class_6559;
      named BI_MAP Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;BI_MAP:Lnet/minecraft/world/chunk/Palette$Factory;
    • ID_LIST

      static final Palette.Factory ID_LIST
      Mappings:
      Namespace Name Mixin selector
      official f Lcqp$e;f:Lcqn$a;
      intermediary field_34571 Lnet/minecraft/class_2841$class_6563;field_34571:Lnet/minecraft/class_2837$class_6559;
      named ID_LIST Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;ID_LIST:Lnet/minecraft/world/chunk/Palette$Factory;
    • BLOCK_STATE

      public static final PalettedContainer.PaletteProvider BLOCK_STATE
      A palette provider that stores 4096 objects in a container. Used in vanilla by block states in a chunk section.
      Mappings:
      Namespace Name Mixin selector
      official d Lcqp$e;d:Lcqp$e;
      intermediary field_34569 Lnet/minecraft/class_2841$class_6563;field_34569:Lnet/minecraft/class_2841$class_6563;
      named BLOCK_STATE Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;BLOCK_STATE:Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;
    • BIOME

      public static final PalettedContainer.PaletteProvider BIOME
      A palette provider that stores 64 objects in a container. Used in vanilla by biomes in a chunk section.
      Mappings:
      Namespace Name Mixin selector
      official e Lcqp$e;e:Lcqp$e;
      intermediary field_34570 Lnet/minecraft/class_2841$class_6563;field_34570:Lnet/minecraft/class_2841$class_6563;
      named BIOME Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;BIOME:Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;
    • edgeBits

      private final int edgeBits
      Mappings:
      Namespace Name Mixin selector
      official g Lcqp$e;g:I
      intermediary field_34572 Lnet/minecraft/class_2841$class_6563;field_34572:I
      named edgeBits Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;edgeBits:I
  • Constructor Details

    • PaletteProvider

      PaletteProvider(int edgeBits)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcqp$e;<init>(I)V
      intermediary <init> Lnet/minecraft/class_2841$class_6563;<init>(I)V
      named <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 a Lcqp$e;a()I
      intermediary method_38312 Lnet/minecraft/class_2841$class_6563;method_38312()I
      named getContainerSize Lnet/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 coordinate
      y - the y coordinate
      z - the z coordinate
      Returns:
      the index of an object in the storage given its x, y, z coordinates
      Mappings:
      Namespace Name Mixin selector
      official a Lcqp$e;a(III)I
      intermediary method_38313 Lnet/minecraft/class_2841$class_6563;method_38313(III)I
      named computeIndex Lnet/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 with bits size in the storage.
      Parameters:
      idList - the id list that maps between objects and full integer IDs
      bits - the number of bits needed to represent all palette entries
      Returns:
      the data provider
      Mappings:
      Namespace Name Mixin selector
      official a Lcqp$e;a(Lgq;I)Lcqp$a;
      intermediary method_38314 Lnet/minecraft/class_2841$class_6563;method_38314(Lnet/minecraft/class_2359;I)Lnet/minecraft/class_2841$class_6560;
      named createDataProvider Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;createDataProvider(Lnet/minecraft/util/collection/IndexedIterable;I)Lnet/minecraft/world/chunk/PalettedContainer$DataProvider;
    • getBits

      <A> int getBits(IndexedIterable<A> idList, int size)
      Mappings:
      Namespace Name Mixin selector
      official b Lcqp$e;b(Lgq;I)I
      intermediary method_38315 Lnet/minecraft/class_2841$class_6563;method_38315(Lnet/minecraft/class_2359;I)I
      named getBits Lnet/minecraft/world/chunk/PalettedContainer$PaletteProvider;getBits(Lnet/minecraft/util/collection/IndexedIterable;I)I