Class SimpleBitStorage

java.lang.Object
net.minecraft.util.SimpleBitStorage
All Implemented Interfaces:
BitStorage

public class SimpleBitStorage extends Object implements BitStorage
  • Field Details

    • MAGIC

      private static final int[] MAGIC
    • data

      private final long[] data
    • bits

      private final int bits
    • mask

      private final long mask
    • size

      private final int size
    • valuesPerLong

      private final int valuesPerLong
    • divideMul

      private final int divideMul
    • divideAdd

      private final int divideAdd
    • divideShift

      private final int divideShift
  • Constructor Details

    • SimpleBitStorage

      public SimpleBitStorage(int p_198164_, int p_198165_, int[] p_198166_)
    • SimpleBitStorage

      public SimpleBitStorage(int p_184717_, int p_184718_)
    • SimpleBitStorage

      public SimpleBitStorage(int p_184724_, int p_184725_, @Nullable long[] p_184726_)
  • Method Details

    • cellIndex

      private int cellIndex(int p_184740_)
    • getAndSet

      public int getAndSet(int p_184731_, int p_184732_)
      Specified by:
      getAndSet in interface BitStorage
    • set

      public void set(int p_184742_, int p_184743_)
      Specified by:
      set in interface BitStorage
    • get

      public int get(int p_184729_)
      Specified by:
      get in interface BitStorage
    • getRaw

      public long[] getRaw()
      Specified by:
      getRaw in interface BitStorage
    • getSize

      public int getSize()
      Specified by:
      getSize in interface BitStorage
    • getBits

      public int getBits()
      Specified by:
      getBits in interface BitStorage
    • getAll

      public void getAll(IntConsumer p_184734_)
      Specified by:
      getAll in interface BitStorage
    • unpack

      public void unpack(int[] p_198168_)
      Specified by:
      unpack in interface BitStorage
    • copy

      public BitStorage copy()
      Specified by:
      copy in interface BitStorage