Class TerraGenerator

java.lang.Object
cn.nukkit.level.terra.TerraGenerator
All Implemented Interfaces:
com.dfsek.terra.api.Handle, com.dfsek.terra.api.world.chunk.generation.util.GeneratorWrapper

@PowerNukkitXOnly @Since("1.6.0.0-PNX") public class TerraGenerator extends Object implements com.dfsek.terra.api.world.chunk.generation.util.GeneratorWrapper
Terra生成器平台实现类
请注意我们通常不直接使用此类而是使用TerraGeneratorWrapper
其每个实例都会持有一个相同的TerraGenerator实例
这样做的原因是因为nk底层会在每个线程新建一个生成器实例并行化生成区块时,而Terra本身就是并行的

Terra generator platform implementation class
Please note that we usually do not use this class directly but use TerraGeneratorWrapper
Each of its instances will hold an identical instance of TerraGenerator
The reason for this is because the bottom layer of nk will create a new generator instance for each thread to generate blocks in parallel, and Terra itself is parallel
  • Constructor Details

    • TerraGenerator

      public TerraGenerator(Level level)
    • TerraGenerator

      public TerraGenerator(Map<String,Object> option, Level level)
    • TerraGenerator

      public TerraGenerator(com.dfsek.terra.api.config.ConfigPack configPack, com.dfsek.terra.api.block.state.BlockState air, Level level)
  • Method Details

    • generateChunk

      public void generateChunk(int chunkX, int chunkZ, ChunkManager chunkManager)
    • populateChunk

      public void populateChunk(int chunkX, int chunkZ, ChunkManager chunkManager)
    • getSettings

      public Map<String,Object> getSettings()
    • getName

      public String getName()
    • getSpawn

      public Vector3 getSpawn()
    • getHandle

      public com.dfsek.terra.api.world.chunk.generation.ChunkGenerator getHandle()
      Specified by:
      getHandle in interface com.dfsek.terra.api.world.chunk.generation.util.GeneratorWrapper
      Specified by:
      getHandle in interface com.dfsek.terra.api.Handle
    • getBiomeProvider

      public com.dfsek.terra.api.world.biome.generation.BiomeProvider getBiomeProvider()
    • getDimensionData

      public DimensionData getDimensionData()
    • getLevel

      public Level getLevel()
    • getConfigPack

      public com.dfsek.terra.api.config.ConfigPack getConfigPack()