Record Class LightData

java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.data.LightData
All Implemented Interfaces:
NetworkBuffer.Writer

public record LightData(@NotNull BitSet skyMask, @NotNull BitSet blockMask, @NotNull BitSet emptySkyMask, @NotNull BitSet emptyBlockMask, @NotNull List<byte[]> skyLight, @NotNull List<byte[]> blockLight) extends Record implements NetworkBuffer.Writer
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    LightData(@NotNull BitSet skyMask, @NotNull BitSet blockMask, @NotNull BitSet emptySkyMask, @NotNull BitSet emptyBlockMask, @NotNull List<byte[]> skyLight, @NotNull List<byte[]> blockLight)
    Creates an instance of a LightData record class.
    LightData(@NotNull NetworkBuffer reader)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull List<byte[]>
    Returns the value of the blockLight record component.
    @NotNull BitSet
    Returns the value of the blockMask record component.
    @NotNull BitSet
    Returns the value of the emptyBlockMask record component.
    @NotNull BitSet
    Returns the value of the emptySkyMask record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    @NotNull List<byte[]>
    Returns the value of the skyLight record component.
    @NotNull BitSet
    Returns the value of the skyMask record component.
    final String
    Returns a string representation of this record class.
    void
    write(@NotNull NetworkBuffer writer)
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Constructor Details

    • LightData

      public LightData(@NotNull @NotNull NetworkBuffer reader)
    • LightData

      public LightData(@NotNull @NotNull BitSet skyMask, @NotNull @NotNull BitSet blockMask, @NotNull @NotNull BitSet emptySkyMask, @NotNull @NotNull BitSet emptyBlockMask, @NotNull @NotNull List<byte[]> skyLight, @NotNull @NotNull List<byte[]> blockLight)
      Creates an instance of a LightData record class.
      Parameters:
      skyMask - the value for the skyMask record component
      blockMask - the value for the blockMask record component
      emptySkyMask - the value for the emptySkyMask record component
      emptyBlockMask - the value for the emptyBlockMask record component
      skyLight - the value for the skyLight record component
      blockLight - the value for the blockLight record component
  • Method Details

    • write

      public void write(@NotNull @NotNull NetworkBuffer writer)
      Specified by:
      write in interface NetworkBuffer.Writer
    • 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.
    • skyMask

      @NotNull public @NotNull BitSet skyMask()
      Returns the value of the skyMask record component.
      Returns:
      the value of the skyMask record component
    • blockMask

      @NotNull public @NotNull BitSet blockMask()
      Returns the value of the blockMask record component.
      Returns:
      the value of the blockMask record component
    • emptySkyMask

      @NotNull public @NotNull BitSet emptySkyMask()
      Returns the value of the emptySkyMask record component.
      Returns:
      the value of the emptySkyMask record component
    • emptyBlockMask

      @NotNull public @NotNull BitSet emptyBlockMask()
      Returns the value of the emptyBlockMask record component.
      Returns:
      the value of the emptyBlockMask record component
    • skyLight

      @NotNull public @NotNull List<byte[]> skyLight()
      Returns the value of the skyLight record component.
      Returns:
      the value of the skyLight record component
    • blockLight

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