Package org.geysermc.geyser.level.chunk
Record Class GeyserChunk
java.lang.Object
java.lang.Record
org.geysermc.geyser.level.chunk.GeyserChunk
public record GeyserChunk(com.github.steveice10.mc.protocol.data.game.chunk.DataPalette[] sections)
extends Record
Acts as a lightweight chunk class that doesn't store biomes, heightmaps or block entities.
-
Constructor Summary
ConstructorDescriptionGeyserChunk(com.github.steveice10.mc.protocol.data.game.chunk.DataPalette[] sections)
Creates an instance of aGeyserChunk
record class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether some other object is "equal to" this one.static GeyserChunk
from(com.github.steveice10.mc.protocol.data.game.chunk.DataPalette[] sections)
int
hashCode()
Returns a hash code value for this object.com.github.steveice10.mc.protocol.data.game.chunk.DataPalette[]
sections()
Returns the value of thesections
record component.toString()
Returns a string representation of this record class.
-
Constructor Details
-
GeyserChunk
public GeyserChunk(com.github.steveice10.mc.protocol.data.game.chunk.DataPalette[] sections)Creates an instance of aGeyserChunk
record class.- Parameters:
sections
- the value for thesections
record component
-
-
Method Details
-
from
public static GeyserChunk from(com.github.steveice10.mc.protocol.data.game.chunk.DataPalette[] sections) -
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)
. -
sections
public com.github.steveice10.mc.protocol.data.game.chunk.DataPalette[] sections()Returns the value of thesections
record component.- Returns:
- the value of the
sections
record component
-