Record Class LightData

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

public record LightData(boolean trustEdges, @NotNull BitSet skyMask, @NotNull BitSet blockMask, @NotNull BitSet emptySkyMask, @NotNull BitSet emptyBlockMask, @NotNull List<byte[]> skyLight, @NotNull List<byte[]> blockLight) extends Record implements Writeable
  • Constructor Summary

    Constructors
    Constructor
    Description
    LightData(boolean trustEdges, @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.
     
  • 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.
    boolean
    Returns the value of the trustEdges record component.
    void
    write(@NotNull BinaryWriter writer)
    Writes into a BinaryWriter.

    Methods inherited from class java.lang.Object

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

    • LightData

      public LightData(BinaryReader reader)
    • LightData

      public LightData(boolean trustEdges, @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:
      trustEdges - the value for the trustEdges record component
      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 BinaryWriter writer)
      Description copied from interface: Writeable
      Writes into a BinaryWriter.
      Specified by:
      write in interface Writeable
      Parameters:
      writer - the writer to write to
    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      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.
    • trustEdges

      public boolean trustEdges()
      Returns the value of the trustEdges record component.
      Returns:
      the value of the trustEdges record component
    • 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