Package cn.nukkit.level.terra.delegate
Record Class PNXChunkDelegate
java.lang.Object
java.lang.Record
cn.nukkit.level.terra.delegate.PNXChunkDelegate
- All Implemented Interfaces:
com.dfsek.terra.api.Handle
,com.dfsek.terra.api.world.chunk.Chunk
,com.dfsek.terra.api.world.chunk.ChunkAccess
@PowerNukkitXOnly
@Since("1.6.0.0-PNX")
public record PNXChunkDelegate(com.dfsek.terra.api.world.ServerWorld world, BaseFullChunk chunk)
extends Record
implements com.dfsek.terra.api.world.chunk.Chunk
-
Constructor Summary
ConstructorDescriptionPNXChunkDelegate
(com.dfsek.terra.api.world.ServerWorld world, BaseFullChunk chunk) Creates an instance of aPNXChunkDelegate
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) com.dfsek.terra.api.world.ServerWorld
getWorld()
int
getX()
int
getZ()
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) void
setBlock
(int i, int i1, int i2, com.dfsek.terra.api.block.state.BlockState blockState, boolean b) final String
toString()
Returns a string representation of this record class.com.dfsek.terra.api.world.ServerWorld
world()
Returns the value of theworld
record component.
-
Constructor Details
-
PNXChunkDelegate
Creates an instance of aPNXChunkDelegate
record class.- Parameters:
world
- the value for theworld
record componentchunk
- the value for thechunk
record component
-
-
Method Details
-
setBlock
public void setBlock(int i, int i1, int i2, com.dfsek.terra.api.block.state.BlockState blockState, boolean b) - Specified by:
setBlock
in interfacecom.dfsek.terra.api.world.chunk.Chunk
-
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.Chunk
- 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.Chunk
- Specified by:
getBlock
in interfacecom.dfsek.terra.api.world.chunk.ChunkAccess
-
getX
public int getX()- Specified by:
getX
in interfacecom.dfsek.terra.api.world.chunk.Chunk
-
getZ
public int getZ()- Specified by:
getZ
in interfacecom.dfsek.terra.api.world.chunk.Chunk
-
getWorld
public com.dfsek.terra.api.world.ServerWorld getWorld()- Specified by:
getWorld
in interfacecom.dfsek.terra.api.world.chunk.Chunk
-
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)
. -
world
public com.dfsek.terra.api.world.ServerWorld world()Returns the value of theworld
record component.- Returns:
- the value of the
world
record component
-
chunk
Returns the value of thechunk
record component.- Returns:
- the value of the
chunk
record component
-