Record Class SerializableChunkData.SectionData
java.lang.Object
java.lang.Record
net.minecraft.world.level.chunk.storage.SerializableChunkData.SectionData
- Enclosing class:
SerializableChunkData
public static record SerializableChunkData.SectionData(int y, @Nullable LevelChunkSection chunkSection, @Nullable DataLayer blockLight, @Nullable DataLayer skyLight)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DataLayer
The field for theblockLight
record component.private final LevelChunkSection
The field for thechunkSection
record component.private final DataLayer
The field for theskyLight
record component.private final int
The field for they
record component. -
Constructor Summary
ConstructorsConstructorDescriptionSectionData
(int y, LevelChunkSection chunkSection, DataLayer blockLight, DataLayer skyLight) Creates an instance of aSectionData
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockLight
record component.Returns the value of thechunkSection
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.skyLight()
Returns the value of theskyLight
record component.final String
toString()
Returns a string representation of this record class.int
y()
Returns the value of they
record component.
-
Field Details
-
y
private final int yThe field for they
record component. -
chunkSection
The field for thechunkSection
record component. -
blockLight
The field for theblockLight
record component. -
skyLight
The field for theskyLight
record component.
-
-
Constructor Details
-
SectionData
public SectionData(int y, @Nullable LevelChunkSection chunkSection, @Nullable DataLayer blockLight, @Nullable DataLayer skyLight) Creates an instance of aSectionData
record class.- Parameters:
y
- the value for they
record componentchunkSection
- the value for thechunkSection
record componentblockLight
- the value for theblockLight
record componentskyLight
- the value for theskyLight
record component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
y
public int y()Returns the value of they
record component.- Returns:
- the value of the
y
record component
-
chunkSection
Returns the value of thechunkSection
record component.- Returns:
- the value of the
chunkSection
record component
-
blockLight
Returns the value of theblockLight
record component.- Returns:
- the value of the
blockLight
record component
-
skyLight
Returns the value of theskyLight
record component.- Returns:
- the value of the
skyLight
record component
-