Package cn.nukkit.level.terra.delegate
Record Class PNXProtoChunk
java.lang.Object
java.lang.Record
cn.nukkit.level.terra.delegate.PNXProtoChunk
- All Implemented Interfaces:
com.dfsek.terra.api.Handle
,com.dfsek.terra.api.world.chunk.ChunkAccess
,com.dfsek.terra.api.world.chunk.generation.ProtoChunk
public record PNXProtoChunk(BaseFullChunk chunk)
extends Record
implements com.dfsek.terra.api.world.chunk.generation.ProtoChunk
-
Constructor Summary
ConstructorDescriptionPNXProtoChunk
(BaseFullChunk chunk) Creates an instance of aPNXProtoChunk
record class. -
Method Summary
Modifier and TypeMethodDescriptionchunk()
Returns the value of thechunk
record component.final boolean
Indicates whether some other object is "equal to" this one.com.dfsek.terra.api.block.state.BlockState
getBlock
(int i, int i1, int i2) int
final int
hashCode()
Returns a hash code value for this object.void
setBlock
(int i, int i1, int i2, com.dfsek.terra.api.block.state.BlockState blockState) final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
PNXProtoChunk
Creates an instance of aPNXProtoChunk
record class.- Parameters:
chunk
- the value for thechunk
record component
-
-
Method Details
-
getMaxHeight
public int getMaxHeight()- Specified by:
getMaxHeight
in interfacecom.dfsek.terra.api.world.chunk.generation.ProtoChunk
-
setBlock
public void setBlock(int i, int i1, int i2, @NotNull com.dfsek.terra.api.block.state.BlockState blockState) - Specified by:
setBlock
in interfacecom.dfsek.terra.api.world.chunk.ChunkAccess
-
getBlock
@NotNull public com.dfsek.terra.api.block.state.BlockState getBlock(int i, int i1, int i2) - Specified by:
getBlock
in interfacecom.dfsek.terra.api.world.chunk.ChunkAccess
-
getHandle
- Specified by:
getHandle
in interfacecom.dfsek.terra.api.Handle
-
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)
. -
chunk
Returns the value of thechunk
record component.- Returns:
- the value of the
chunk
record component
-