Record Class LightData
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.data.LightData
- All Implemented Interfaces:
NetworkBuffer.Writer
-
Field Summary
-
Constructor Summary
ConstructorDescriptionLightData
(@NotNull BitSet skyMask, @NotNull BitSet blockMask, @NotNull BitSet emptySkyMask, @NotNull BitSet emptyBlockMask, @NotNull List<byte[]> skyLight, @NotNull List<byte[]> blockLight) Creates an instance of aLightData
record class.LightData
(@NotNull NetworkBuffer reader) -
Method Summary
Modifier and TypeMethodDescription@NotNull List
<byte[]> Returns the value of theblockLight
record component.@NotNull BitSet
Returns the value of theblockMask
record component.@NotNull BitSet
Returns the value of theemptyBlockMask
record component.@NotNull BitSet
Returns the value of theemptySkyMask
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.@NotNull List
<byte[]> skyLight()
Returns the value of theskyLight
record component.@NotNull BitSet
skyMask()
Returns the value of theskyMask
record component.final String
toString()
Returns a string representation of this record class.void
write
(@NotNull NetworkBuffer writer)
-
Field Details
-
MAX_SECTIONS
public static final int MAX_SECTIONS- See Also:
-
-
Constructor Details
-
LightData
-
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 aLightData
record class.- Parameters:
skyMask
- the value for theskyMask
record componentblockMask
- the value for theblockMask
record componentemptySkyMask
- the value for theemptySkyMask
record componentemptyBlockMask
- the value for theemptyBlockMask
record componentskyLight
- the value for theskyLight
record componentblockLight
- the value for theblockLight
record component
-
-
Method Details
-
write
- Specified by:
write
in interfaceNetworkBuffer.Writer
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
. -
skyMask
Returns the value of theskyMask
record component.- Returns:
- the value of the
skyMask
record component
-
blockMask
Returns the value of theblockMask
record component.- Returns:
- the value of the
blockMask
record component
-
emptySkyMask
Returns the value of theemptySkyMask
record component.- Returns:
- the value of the
emptySkyMask
record component
-
emptyBlockMask
Returns the value of theemptyBlockMask
record component.- Returns:
- the value of the
emptyBlockMask
record component
-
skyLight
Returns the value of theskyLight
record component.- Returns:
- the value of the
skyLight
record component
-
blockLight
Returns the value of theblockLight
record component.- Returns:
- the value of the
blockLight
record component
-