Record Class ClientboundLightUpdatePacketData

java.lang.Object
java.lang.Record
net.minecraft.network.protocol.game.ClientboundLightUpdatePacketData

public record ClientboundLightUpdatePacketData(BitSet skyYMask, BitSet blockYMask, BitSet emptySkyYMask, BitSet emptyBlockYMask, List<byte[]> skyUpdates, List<byte[]> blockUpdates) extends Record
  • Field Details

    • skyYMask

      private final BitSet skyYMask
      The field for the skyYMask record component.
    • blockYMask

      private final BitSet blockYMask
      The field for the blockYMask record component.
    • emptySkyYMask

      private final BitSet emptySkyYMask
      The field for the emptySkyYMask record component.
    • emptyBlockYMask

      private final BitSet emptyBlockYMask
      The field for the emptyBlockYMask record component.
    • skyUpdates

      private final List<byte[]> skyUpdates
      The field for the skyUpdates record component.
    • blockUpdates

      private final List<byte[]> blockUpdates
      The field for the blockUpdates record component.
    • DATA_LAYER_STREAM_CODEC

      private static final StreamCodec<io.netty.buffer.ByteBuf, byte[]> DATA_LAYER_STREAM_CODEC
    • STREAM_CODEC

      public static final StreamCodec<io.netty.buffer.ByteBuf, ClientboundLightUpdatePacketData> STREAM_CODEC
  • Constructor Details

    • ClientboundLightUpdatePacketData

      public ClientboundLightUpdatePacketData(ChunkPos chunkPos, LevelLightEngine lightEngine, @Nullable BitSet skyChangedLightSectionFilter, @Nullable BitSet blockChangedLightSectionFilter)
    • ClientboundLightUpdatePacketData

      public ClientboundLightUpdatePacketData(BitSet skyYMask, BitSet blockYMask, BitSet emptySkyYMask, BitSet emptyBlockYMask, List<byte[]> skyUpdates, List<byte[]> blockUpdates)
      Creates an instance of a ClientboundLightUpdatePacketData record class.
      Parameters:
      skyYMask - the value for the skyYMask record component
      blockYMask - the value for the blockYMask record component
      emptySkyYMask - the value for the emptySkyYMask record component
      emptyBlockYMask - the value for the emptyBlockYMask record component
      skyUpdates - the value for the skyUpdates record component
      blockUpdates - the value for the blockUpdates record component
  • Method Details

    • prepareSectionData

      private void prepareSectionData(ChunkPos pos, LevelLightEngine lightEngine, LightLayer layer, int sectionIndex, BitSet mask, BitSet emptyMask, List<byte[]> updates)
    • 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 o)
      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:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • skyYMask

      public BitSet skyYMask()
      Returns the value of the skyYMask record component.
      Returns:
      the value of the skyYMask record component
    • blockYMask

      public BitSet blockYMask()
      Returns the value of the blockYMask record component.
      Returns:
      the value of the blockYMask record component
    • emptySkyYMask

      public BitSet emptySkyYMask()
      Returns the value of the emptySkyYMask record component.
      Returns:
      the value of the emptySkyYMask record component
    • emptyBlockYMask

      public BitSet emptyBlockYMask()
      Returns the value of the emptyBlockYMask record component.
      Returns:
      the value of the emptyBlockYMask record component
    • skyUpdates

      public List<byte[]> skyUpdates()
      Returns the value of the skyUpdates record component.
      Returns:
      the value of the skyUpdates record component
    • blockUpdates

      public List<byte[]> blockUpdates()
      Returns the value of the blockUpdates record component.
      Returns:
      the value of the blockUpdates record component