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
public record PNXChunkDelegate(BaseFullChunk chunk, ChunkManager chunkManager, com.dfsek.terra.api.world.chunk.generation.ChunkGenerator chunkGenerator, com.dfsek.terra.api.config.ConfigPack configPack, com.dfsek.terra.api.world.biome.generation.BiomeProvider biomeProvider)
extends Record
implements com.dfsek.terra.api.world.chunk.Chunk
-
Constructor Summary
ConstructorDescriptionPNXChunkDelegate
(BaseFullChunk chunk, ChunkManager chunkManager, com.dfsek.terra.api.world.chunk.generation.ChunkGenerator chunkGenerator, com.dfsek.terra.api.config.ConfigPack configPack, com.dfsek.terra.api.world.biome.generation.BiomeProvider biomeProvider) Creates an instance of aPNXChunkDelegate
record class. -
Method Summary
Modifier and TypeMethodDescriptioncom.dfsek.terra.api.world.biome.generation.BiomeProvider
Returns the value of thebiomeProvider
record component.chunk()
Returns the value of thechunk
record component.com.dfsek.terra.api.world.chunk.generation.ChunkGenerator
Returns the value of thechunkGenerator
record component.Returns the value of thechunkManager
record component.com.dfsek.terra.api.config.ConfigPack
Returns the value of theconfigPack
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.
-
Constructor Details
-
PNXChunkDelegate
public PNXChunkDelegate(BaseFullChunk chunk, ChunkManager chunkManager, com.dfsek.terra.api.world.chunk.generation.ChunkGenerator chunkGenerator, com.dfsek.terra.api.config.ConfigPack configPack, com.dfsek.terra.api.world.biome.generation.BiomeProvider biomeProvider) Creates an instance of aPNXChunkDelegate
record class.- Parameters:
chunk
- the value for thechunk
record componentchunkManager
- the value for thechunkManager
record componentchunkGenerator
- the value for thechunkGenerator
record componentconfigPack
- the value for theconfigPack
record componentbiomeProvider
- the value for thebiomeProvider
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)
. -
chunk
Returns the value of thechunk
record component.- Returns:
- the value of the
chunk
record component
-
chunkManager
Returns the value of thechunkManager
record component.- Returns:
- the value of the
chunkManager
record component
-
chunkGenerator
public com.dfsek.terra.api.world.chunk.generation.ChunkGenerator chunkGenerator()Returns the value of thechunkGenerator
record component.- Returns:
- the value of the
chunkGenerator
record component
-
configPack
public com.dfsek.terra.api.config.ConfigPack configPack()Returns the value of theconfigPack
record component.- Returns:
- the value of the
configPack
record component
-
biomeProvider
public com.dfsek.terra.api.world.biome.generation.BiomeProvider biomeProvider()Returns the value of thebiomeProvider
record component.- Returns:
- the value of the
biomeProvider
record component
-