Class PalettedContainer<T>

java.lang.Object
net.minecraft.world.chunk.PalettedContainer<T>
All Implemented Interfaces:
PaletteResizeListener<T>

public class PalettedContainer<T> extends Object implements PaletteResizeListener<T>
Mappings:
Namespace Name
official cnd
intermediary net/minecraft/class_2841
named net/minecraft/world/chunk/PalettedContainer
  • Field Details

    • field_31411

      private static final int field_31411
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official d Lcnd;d:I
      intermediary field_31411 Lnet/minecraft/class_2841;field_31411:I
      named field_31411 Lnet/minecraft/world/chunk/PalettedContainer;field_31411:I
    • field_31409

      public static final int field_31409
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official a Lcnd;a:I
      intermediary field_31409 Lnet/minecraft/class_2841;field_31409:I
      named field_31409 Lnet/minecraft/world/chunk/PalettedContainer;field_31409:I
    • field_31410

      public static final int field_31410
      See Also:
      Mappings:
      Namespace Name Mixin selector
      official b Lcnd;b:I
      intermediary field_31410 Lnet/minecraft/class_2841;field_31410:I
      named field_31410 Lnet/minecraft/world/chunk/PalettedContainer;field_31410:I
    • fallbackPalette

      private final Palette<T> fallbackPalette
      Mappings:
      Namespace Name Mixin selector
      official e Lcnd;e:Lcnb;
      intermediary field_12940 Lnet/minecraft/class_2841;field_12940:Lnet/minecraft/class_2837;
      named fallbackPalette Lnet/minecraft/world/chunk/PalettedContainer;fallbackPalette:Lnet/minecraft/world/chunk/Palette;
    • noOpPaletteResizeHandler

      private final PaletteResizeListener<T> noOpPaletteResizeHandler
      Mappings:
      Namespace Name Mixin selector
      official f Lcnd;f:Lcnc;
      intermediary field_12942 Lnet/minecraft/class_2841;field_12942:Lnet/minecraft/class_2835;
      named noOpPaletteResizeHandler Lnet/minecraft/world/chunk/PalettedContainer;noOpPaletteResizeHandler:Lnet/minecraft/world/chunk/PaletteResizeListener;
    • idList

      private final IdList<T> idList
      Mappings:
      Namespace Name Mixin selector
      official g Lcnd;g:Lgq;
      intermediary field_12938 Lnet/minecraft/class_2841;field_12938:Lnet/minecraft/class_2361;
      named idList Lnet/minecraft/world/chunk/PalettedContainer;idList:Lnet/minecraft/util/collection/IdList;
    • elementDeserializer

      private final Function<NbtCompound,T> elementDeserializer
      Mappings:
      Namespace Name Mixin selector
      official h Lcnd;h:Ljava/util/function/Function;
      intermediary field_12943 Lnet/minecraft/class_2841;field_12943:Ljava/util/function/Function;
      named elementDeserializer Lnet/minecraft/world/chunk/PalettedContainer;elementDeserializer:Ljava/util/function/Function;
    • elementSerializer

      private final Function<T,NbtCompound> elementSerializer
      Mappings:
      Namespace Name Mixin selector
      official i Lcnd;i:Ljava/util/function/Function;
      intermediary field_12939 Lnet/minecraft/class_2841;field_12939:Ljava/util/function/Function;
      named elementSerializer Lnet/minecraft/world/chunk/PalettedContainer;elementSerializer:Ljava/util/function/Function;
    • defaultValue

      private final T defaultValue
      Mappings:
      Namespace Name Mixin selector
      official j Lcnd;j:Ljava/lang/Object;
      intermediary field_12935 Lnet/minecraft/class_2841;field_12935:Ljava/lang/Object;
      named defaultValue Lnet/minecraft/world/chunk/PalettedContainer;defaultValue:Ljava/lang/Object;
    • data

      protected PackedIntegerArray data
      Mappings:
      Namespace Name Mixin selector
      official c Lcnd;c:Lagg;
      intermediary field_12941 Lnet/minecraft/class_2841;field_12941:Lnet/minecraft/class_3508;
      named data Lnet/minecraft/world/chunk/PalettedContainer;data:Lnet/minecraft/util/collection/PackedIntegerArray;
    • palette

      private Palette<T> palette
      Mappings:
      Namespace Name Mixin selector
      official k Lcnd;k:Lcnb;
      intermediary field_12936 Lnet/minecraft/class_2841;field_12936:Lnet/minecraft/class_2837;
      named palette Lnet/minecraft/world/chunk/PalettedContainer;palette:Lnet/minecraft/world/chunk/Palette;
    • paletteSize

      private int paletteSize
      Mappings:
      Namespace Name Mixin selector
      official l Lcnd;l:I
      intermediary field_12934 Lnet/minecraft/class_2841;field_12934:I
      named paletteSize Lnet/minecraft/world/chunk/PalettedContainer;paletteSize:I
    • writeLock

      private final Semaphore writeLock
      Mappings:
      Namespace Name Mixin selector
      official m Lcnd;m:Ljava/util/concurrent/Semaphore;
      intermediary field_12937 Lnet/minecraft/class_2841;field_12937:Ljava/util/concurrent/Semaphore;
      named writeLock Lnet/minecraft/world/chunk/PalettedContainer;writeLock:Ljava/util/concurrent/Semaphore;
    • lockStack

      @Nullable private final @Nullable AtomicStack<com.mojang.datafixers.util.Pair<Thread,StackTraceElement[]>> lockStack
      Mappings:
      Namespace Name Mixin selector
      official n Lcnd;n:Lagm;
      intermediary field_28812 Lnet/minecraft/class_2841;field_28812:Lnet/minecraft/class_5831;
      named lockStack Lnet/minecraft/world/chunk/PalettedContainer;lockStack:Lnet/minecraft/util/thread/AtomicStack;
  • Constructor Details

    • PalettedContainer

      public PalettedContainer(Palette<T> fallbackPalette, IdList<T> idList, Function<NbtCompound,T> elementDeserializer, Function<T,NbtCompound> elementSerializer, T defaultElement)
      Mappings:
      Namespace Name Mixin selector
      official <init> Lcnd;<init>(Lcnb;Lgq;Ljava/util/function/Function;Ljava/util/function/Function;Ljava/lang/Object;)V
      intermediary <init> Lnet/minecraft/class_2841;<init>(Lnet/minecraft/class_2837;Lnet/minecraft/class_2361;Ljava/util/function/Function;Ljava/util/function/Function;Ljava/lang/Object;)V
      named <init> Lnet/minecraft/world/chunk/PalettedContainer;<init>(Lnet/minecraft/world/chunk/Palette;Lnet/minecraft/util/collection/IdList;Ljava/util/function/Function;Ljava/util/function/Function;Ljava/lang/Object;)V
  • Method Details

    • lock

      public void lock()
      Mappings:
      Namespace Name Mixin selector
      official a Lcnd;a()V
      intermediary method_12334 Lnet/minecraft/class_2841;method_12334()V
      named lock Lnet/minecraft/world/chunk/PalettedContainer;lock()V
    • unlock

      public void unlock()
      Mappings:
      Namespace Name Mixin selector
      official b Lcnd;b()V
      intermediary method_12335 Lnet/minecraft/class_2841;method_12335()V
      named unlock Lnet/minecraft/world/chunk/PalettedContainer;unlock()V
    • toIndex

      private static int toIndex(int x, int y, int z)
      Mappings:
      Namespace Name Mixin selector
      official b Lcnd;b(III)I
      intermediary method_12323 Lnet/minecraft/class_2841;method_12323(III)I
      named toIndex Lnet/minecraft/world/chunk/PalettedContainer;toIndex(III)I
    • setPaletteSize

      private void setPaletteSize(int size)
      Mappings:
      Namespace Name Mixin selector
      official b Lcnd;b(I)V
      intermediary method_12324 Lnet/minecraft/class_2841;method_12324(I)V
      named setPaletteSize Lnet/minecraft/world/chunk/PalettedContainer;setPaletteSize(I)V
    • onResize

      public int onResize(int newSize, T objectAdded)
      Specified by:
      onResize in interface PaletteResizeListener<T>
      Mappings:
      Namespace Name Mixin selector
      official onResize Lcnc;onResize(ILjava/lang/Object;)I
      intermediary onResize Lnet/minecraft/class_2835;onResize(ILjava/lang/Object;)I
      named onResize Lnet/minecraft/world/chunk/PaletteResizeListener;onResize(ILjava/lang/Object;)I
    • setSync

      public T setSync(int x, int y, int z, T value)
      Mappings:
      Namespace Name Mixin selector
      official a Lcnd;a(IIILjava/lang/Object;)Ljava/lang/Object;
      intermediary method_12328 Lnet/minecraft/class_2841;method_12328(IIILjava/lang/Object;)Ljava/lang/Object;
      named setSync Lnet/minecraft/world/chunk/PalettedContainer;setSync(IIILjava/lang/Object;)Ljava/lang/Object;
    • set

      public T set(int x, int y, int z, T value)
      Mappings:
      Namespace Name Mixin selector
      official b Lcnd;b(IIILjava/lang/Object;)Ljava/lang/Object;
      intermediary method_16678 Lnet/minecraft/class_2841;method_16678(IIILjava/lang/Object;)Ljava/lang/Object;
      named set Lnet/minecraft/world/chunk/PalettedContainer;set(IIILjava/lang/Object;)Ljava/lang/Object;
    • setAndGetOldValue

      private T setAndGetOldValue(int index, T value)
      Mappings:
      Namespace Name Mixin selector
      official a Lcnd;a(ILjava/lang/Object;)Ljava/lang/Object;
      intermediary method_12336 Lnet/minecraft/class_2841;method_12336(ILjava/lang/Object;)Ljava/lang/Object;
      named setAndGetOldValue Lnet/minecraft/world/chunk/PalettedContainer;setAndGetOldValue(ILjava/lang/Object;)Ljava/lang/Object;
    • method_35321

      public void method_35321(int int2, int int3, int int4, T t)
      Mappings:
      Namespace Name Mixin selector
      official c Lcnd;c(IIILjava/lang/Object;)V
      intermediary method_35321 Lnet/minecraft/class_2841;method_35321(IIILjava/lang/Object;)V
      named method_35321 Lnet/minecraft/world/chunk/PalettedContainer;method_35321(IIILjava/lang/Object;)V
    • set

      private void set(int index, T t)
      Mappings:
      Namespace Name Mixin selector
      official b Lcnd;b(ILjava/lang/Object;)V
      intermediary method_12322 Lnet/minecraft/class_2841;method_12322(ILjava/lang/Object;)V
      named set Lnet/minecraft/world/chunk/PalettedContainer;set(ILjava/lang/Object;)V
    • get

      public T get(int x, int y, int z)
      Mappings:
      Namespace Name Mixin selector
      official a Lcnd;a(III)Ljava/lang/Object;
      intermediary method_12321 Lnet/minecraft/class_2841;method_12321(III)Ljava/lang/Object;
      named get Lnet/minecraft/world/chunk/PalettedContainer;get(III)Ljava/lang/Object;
    • get

      protected T get(int index)
      Mappings:
      Namespace Name Mixin selector
      official a Lcnd;a(I)Ljava/lang/Object;
      intermediary method_12331 Lnet/minecraft/class_2841;method_12331(I)Ljava/lang/Object;
      named get Lnet/minecraft/world/chunk/PalettedContainer;get(I)Ljava/lang/Object;
    • fromPacket

      public void fromPacket(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      official a Lcnd;a(Log;)V
      intermediary method_12326 Lnet/minecraft/class_2841;method_12326(Lnet/minecraft/class_2540;)V
      named fromPacket Lnet/minecraft/world/chunk/PalettedContainer;fromPacket(Lnet/minecraft/network/PacketByteBuf;)V
    • toPacket

      public void toPacket(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      official b Lcnd;b(Log;)V
      intermediary method_12325 Lnet/minecraft/class_2841;method_12325(Lnet/minecraft/class_2540;)V
      named toPacket Lnet/minecraft/world/chunk/PalettedContainer;toPacket(Lnet/minecraft/network/PacketByteBuf;)V
    • read

      public void read(NbtList paletteNbt, long[] data)
      Mappings:
      Namespace Name Mixin selector
      official a Lcnd;a(Lng;[J)V
      intermediary method_12329 Lnet/minecraft/class_2841;method_12329(Lnet/minecraft/class_2499;[J)V
      named read Lnet/minecraft/world/chunk/PalettedContainer;read(Lnet/minecraft/nbt/NbtList;[J)V
    • write

      public void write(NbtCompound nbt, String paletteKey, String dataKey)
      Mappings:
      Namespace Name Mixin selector
      official a Lcnd;a(Lna;Ljava/lang/String;Ljava/lang/String;)V
      intermediary method_12330 Lnet/minecraft/class_2841;method_12330(Lnet/minecraft/class_2487;Ljava/lang/String;Ljava/lang/String;)V
      named write Lnet/minecraft/world/chunk/PalettedContainer;write(Lnet/minecraft/nbt/NbtCompound;Ljava/lang/String;Ljava/lang/String;)V
    • getPacketSize

      public int getPacketSize()
      Mappings:
      Namespace Name Mixin selector
      official c Lcnd;c()I
      intermediary method_12327 Lnet/minecraft/class_2841;method_12327()I
      named getPacketSize Lnet/minecraft/world/chunk/PalettedContainer;getPacketSize()I
    • hasAny

      public boolean hasAny(Predicate<T> predicate)
      Mappings:
      Namespace Name Mixin selector
      official a Lcnd;a(Ljava/util/function/Predicate;)Z
      intermediary method_19526 Lnet/minecraft/class_2841;method_19526(Ljava/util/function/Predicate;)Z
      named hasAny Lnet/minecraft/world/chunk/PalettedContainer;hasAny(Ljava/util/function/Predicate;)Z
    • count

      public void count(PalettedContainer.CountConsumer<T> consumer)
      Mappings:
      Namespace Name Mixin selector
      official a Lcnd;a(Lcnd$a;)V
      intermediary method_21732 Lnet/minecraft/class_2841;method_21732(Lnet/minecraft/class_2841$class_4464;)V
      named count Lnet/minecraft/world/chunk/PalettedContainer;count(Lnet/minecraft/world/chunk/PalettedContainer$CountConsumer;)V