Class BiMapPalette<T>

java.lang.Object
net.minecraft.world.chunk.BiMapPalette<T>
All Implemented Interfaces:
Palette<T>

public class BiMapPalette<T> extends Object implements Palette<T>
Mappings:
Namespace Name
official cmu
intermediary net/minecraft/class_2814
named net/minecraft/world/chunk/BiMapPalette
  • Field Details

    • idList

      private final IdList<T> idList
      Mappings:
      Namespace Name Mixin selector
      official a Lcmu;a:Lgq;
      intermediary field_12821 Lnet/minecraft/class_2814;field_12821:Lnet/minecraft/class_2361;
      named idList Lnet/minecraft/world/chunk/BiMapPalette;idList:Lnet/minecraft/util/collection/IdList;
    • map

      private final Int2ObjectBiMap<T> map
      Mappings:
      Namespace Name Mixin selector
      official b Lcmu;b:Lagi;
      intermediary field_12824 Lnet/minecraft/class_2814;field_12824:Lnet/minecraft/class_3513;
      named map Lnet/minecraft/world/chunk/BiMapPalette;map:Lnet/minecraft/util/collection/Int2ObjectBiMap;
    • resizeHandler

      private final PaletteResizeListener<T> resizeHandler
      Mappings:
      Namespace Name Mixin selector
      official c Lcmu;c:Lcnc;
      intermediary field_12825 Lnet/minecraft/class_2814;field_12825:Lnet/minecraft/class_2835;
      named resizeHandler Lnet/minecraft/world/chunk/BiMapPalette;resizeHandler:Lnet/minecraft/world/chunk/PaletteResizeListener;
    • elementDeserializer

      private final Function<NbtCompound,​T> elementDeserializer
      Mappings:
      Namespace Name Mixin selector
      official d Lcmu;d:Ljava/util/function/Function;
      intermediary field_12823 Lnet/minecraft/class_2814;field_12823:Ljava/util/function/Function;
      named elementDeserializer Lnet/minecraft/world/chunk/BiMapPalette;elementDeserializer:Ljava/util/function/Function;
    • elementSerializer

      private final Function<T,​NbtCompound> elementSerializer
      Mappings:
      Namespace Name Mixin selector
      official e Lcmu;e:Ljava/util/function/Function;
      intermediary field_12826 Lnet/minecraft/class_2814;field_12826:Ljava/util/function/Function;
      named elementSerializer Lnet/minecraft/world/chunk/BiMapPalette;elementSerializer:Ljava/util/function/Function;
    • indexBits

      private final int indexBits
      Mappings:
      Namespace Name Mixin selector
      official f Lcmu;f:I
      intermediary field_12822 Lnet/minecraft/class_2814;field_12822:I
      named indexBits Lnet/minecraft/world/chunk/BiMapPalette;indexBits:I
  • Constructor Details

    • BiMapPalette

      public BiMapPalette(IdList<T> idList, int indexBits, PaletteResizeListener<T> resizeHandler, Function<NbtCompound,​T> elementDeserializer, Function<T,​NbtCompound> elementSerializer)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcmu;<init>(Lgq;ILcnc;Ljava/util/function/Function;Ljava/util/function/Function;)V
      intermediary <init> Lnet/minecraft/class_2814;<init>(Lnet/minecraft/class_2361;ILnet/minecraft/class_2835;Ljava/util/function/Function;Ljava/util/function/Function;)V
      named <init> Lnet/minecraft/world/chunk/BiMapPalette;<init>(Lnet/minecraft/util/collection/IdList;ILnet/minecraft/world/chunk/PaletteResizeListener;Ljava/util/function/Function;Ljava/util/function/Function;)V
  • Method Details

    • getIndex

      public int getIndex(T object)
      Specified by:
      getIndex in interface Palette<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lcnb;a(Ljava/lang/Object;)I
      intermediary method_12291 Lnet/minecraft/class_2837;method_12291(Ljava/lang/Object;)I
      named getIndex Lnet/minecraft/world/chunk/Palette;getIndex(Ljava/lang/Object;)I
    • accepts

      public boolean accepts(Predicate<T> predicate)
      Specified by:
      accepts in interface Palette<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lcnb;a(Ljava/util/function/Predicate;)Z
      intermediary method_19525 Lnet/minecraft/class_2837;method_19525(Ljava/util/function/Predicate;)Z
      named accepts Lnet/minecraft/world/chunk/Palette;accepts(Ljava/util/function/Predicate;)Z
    • getByIndex

      @Nullable public T getByIndex(int index)
      Specified by:
      getByIndex in interface Palette<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lcnb;a(I)Ljava/lang/Object;
      intermediary method_12288 Lnet/minecraft/class_2837;method_12288(I)Ljava/lang/Object;
      named getByIndex Lnet/minecraft/world/chunk/Palette;getByIndex(I)Ljava/lang/Object;
    • fromPacket

      public void fromPacket(PacketByteBuf buf)
      Specified by:
      fromPacket in interface Palette<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lcnb;a(Log;)V
      intermediary method_12289 Lnet/minecraft/class_2837;method_12289(Lnet/minecraft/class_2540;)V
      named fromPacket Lnet/minecraft/world/chunk/Palette;fromPacket(Lnet/minecraft/network/PacketByteBuf;)V
    • toPacket

      public void toPacket(PacketByteBuf buf)
      Specified by:
      toPacket in interface Palette<T>
      Mappings:
      Namespace Name Mixin selector
      official b Lcnb;b(Log;)V
      intermediary method_12287 Lnet/minecraft/class_2837;method_12287(Lnet/minecraft/class_2540;)V
      named toPacket Lnet/minecraft/world/chunk/Palette;toPacket(Lnet/minecraft/network/PacketByteBuf;)V
    • getPacketSize

      public int getPacketSize()
      Specified by:
      getPacketSize in interface Palette<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lcnb;a()I
      intermediary method_12290 Lnet/minecraft/class_2837;method_12290()I
      named getPacketSize Lnet/minecraft/world/chunk/Palette;getPacketSize()I
    • getIndexBits

      public int getIndexBits()
      Specified by:
      getIndexBits in interface Palette<T>
      Mappings:
      Namespace Name Mixin selector
      official b Lcnb;b()I
      intermediary method_12197 Lnet/minecraft/class_2837;method_12197()I
      named getIndexBits Lnet/minecraft/world/chunk/Palette;getIndexBits()I
    • readNbt

      public void readNbt(NbtList nbt)
      Specified by:
      readNbt in interface Palette<T>
      Mappings:
      Namespace Name Mixin selector
      official a Lcnb;a(Lng;)V
      intermediary method_12286 Lnet/minecraft/class_2837;method_12286(Lnet/minecraft/class_2499;)V
      named readNbt Lnet/minecraft/world/chunk/Palette;readNbt(Lnet/minecraft/nbt/NbtList;)V
    • writeNbt

      public void writeNbt(NbtList nbt)
      Mappings:
      Namespace Name Mixin selector
      official b Lcmu;b(Lng;)V
      intermediary method_12196 Lnet/minecraft/class_2814;method_12196(Lnet/minecraft/class_2499;)V
      named writeNbt Lnet/minecraft/world/chunk/BiMapPalette;writeNbt(Lnet/minecraft/nbt/NbtList;)V