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 DataLayerThe field for theblockLightrecord component.private final LevelChunkSectionThe field for thechunkSectionrecord component.private final DataLayerThe field for theskyLightrecord component.private final intThe field for theyrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSectionData(int y, LevelChunkSection chunkSection, DataLayer blockLight, DataLayer skyLight) Creates an instance of aSectionDatarecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theblockLightrecord component.Returns the value of thechunkSectionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.skyLight()Returns the value of theskyLightrecord component.final StringtoString()Returns a string representation of this record class.inty()Returns the value of theyrecord component.
-
Field Details
-
y
private final int yThe field for theyrecord component. -
chunkSection
The field for thechunkSectionrecord component. -
blockLight
The field for theblockLightrecord component. -
skyLight
The field for theskyLightrecord component.
-
-
Constructor Details
-
SectionData
public SectionData(int y, @Nullable LevelChunkSection chunkSection, @Nullable DataLayer blockLight, @Nullable DataLayer skyLight) Creates an instance of aSectionDatarecord class.- Parameters:
y- the value for theyrecord componentchunkSection- the value for thechunkSectionrecord componentblockLight- the value for theblockLightrecord componentskyLight- the value for theskyLightrecord 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 theyrecord component.- Returns:
- the value of the
yrecord component
-
chunkSection
Returns the value of thechunkSectionrecord component.- Returns:
- the value of the
chunkSectionrecord component
-
blockLight
Returns the value of theblockLightrecord component.- Returns:
- the value of the
blockLightrecord component
-
skyLight
Returns the value of theskyLightrecord component.- Returns:
- the value of the
skyLightrecord component
-