Record Class PalettedContainer.Data<T>

java.lang.Object
java.lang.Record
net.minecraft.world.chunk.PalettedContainer.Data<T>
Record Components:
configuration - the data provider that derives the palette and storage of this data
storage - the data
palette - the palette for the storage
Enclosing class:
PalettedContainer<T>

private static record PalettedContainer.Data<T>(PalettedContainer.DataProvider<T> configuration, PaletteStorage storage, Palette<T> palette) extends Record
Runtime representation of data in a paletted container.
Mappings:
Namespace Name
named net/minecraft/world/chunk/PalettedContainer$Data
intermediary net/minecraft/class_2841$class_6561
official dus$c
named configuration
intermediary comp_74
official a
named storage
intermediary comp_118
official b
named palette
intermediary comp_119
official c
  • Field Details

  • Constructor Details

  • Method Details

    • importFrom

      public void importFrom(Palette<T> palette, PaletteStorage storage)
      Imports the data from the other storage with the other palette.
      Mappings:
      Namespace Name Mixin selector
      named importFrom Lnet/minecraft/world/chunk/PalettedContainer$Data;importFrom(Lnet/minecraft/world/chunk/Palette;Lnet/minecraft/util/collection/PaletteStorage;)V
      intermediary method_38308 Lnet/minecraft/class_2841$class_6561;method_38308(Lnet/minecraft/class_2837;Lnet/minecraft/class_6490;)V
      official a Ldus$c;a(Lduq;Laxn;)V
    • getPacketSize

      public int getPacketSize()
      Returns the size of this data, in bytes, when written to a packet.
      Returns:
      the size of this data, in bytes, when written to a packet
      See Also:
      Mappings:
      Namespace Name Mixin selector
      named getPacketSize Lnet/minecraft/world/chunk/PalettedContainer$Data;getPacketSize()I
      intermediary method_38306 Lnet/minecraft/class_2841$class_6561;method_38306()I
      official a Ldus$c;a()I
    • writePacket

      public void writePacket(PacketByteBuf buf)
      Mappings:
      Namespace Name Mixin selector
      named writePacket Lnet/minecraft/world/chunk/PalettedContainer$Data;writePacket(Lnet/minecraft/network/PacketByteBuf;)V
      intermediary method_38309 Lnet/minecraft/class_2841$class_6561;method_38309(Lnet/minecraft/class_2540;)V
      official a Ldus$c;a(Lwm;)V
    • copy

      public PalettedContainer.Data<T> copy()
      Mappings:
      Namespace Name Mixin selector
      named copy Lnet/minecraft/world/chunk/PalettedContainer$Data;copy()Lnet/minecraft/world/chunk/PalettedContainer$Data;
      intermediary method_44338 Lnet/minecraft/class_2841$class_6561;method_44338()Lnet/minecraft/class_2841$class_6561;
      official b Ldus$c;b()Ldus$c;
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object object)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • configuration

      public PalettedContainer.DataProvider<T> configuration()
      Returns the value of the configuration record component.
      Returns:
      the value of the configuration record component
    • storage

      public PaletteStorage storage()
      Returns the value of the storage record component.
      Returns:
      the value of the storage record component
    • palette

      public Palette<T> palette()
      Returns the value of the palette record component.
      Returns:
      the value of the palette record component