Record Class ChunkData
java.lang.Object
java.lang.Record
net.minestom.server.network.packet.server.play.data.ChunkData
- All Implemented Interfaces:
NetworkBuffer.Writer
public record ChunkData(@NotNull org.jglrxavpok.hephaistos.nbt.NBTCompound heightmaps, byte @NotNull [] data, @NotNull Map<Integer,Block> blockEntities)
extends Record
implements NetworkBuffer.Writer
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockEntities
record component.byte @NotNull []
data()
Returns the value of thedata
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 org.jglrxavpok.hephaistos.nbt.NBTCompound
Returns the value of theheightmaps
record component.final String
toString()
Returns a string representation of this record class.void
write
(@NotNull NetworkBuffer writer)
-
Constructor Details
-
ChunkData
public ChunkData(@NotNull @NotNull org.jglrxavpok.hephaistos.nbt.NBTCompound heightmaps, byte @NotNull [] data, @NotNull @NotNull Map<Integer, Block> blockEntities) Creates an instance of aChunkData
record class.- Parameters:
heightmaps
- the value for theheightmaps
record componentdata
- the value for thedata
record componentblockEntities
- the value for theblockEntities
record component
-
ChunkData
-
-
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)
. -
heightmaps
@NotNull public @NotNull org.jglrxavpok.hephaistos.nbt.NBTCompound heightmaps()Returns the value of theheightmaps
record component.- Returns:
- the value of the
heightmaps
record component
-
data
public byte @NotNull [] data()Returns the value of thedata
record component.- Returns:
- the value of the
data
record component
-
blockEntities
Returns the value of theblockEntities
record component.- Returns:
- the value of the
blockEntities
record component
-