Package net.minestom.server.instance
Interface ChunkGenerator
public interface ChunkGenerator
Responsible for the
Chunk
generation, can be set using Instance.setChunkGenerator(ChunkGenerator)
.
Called if the instance IChunkLoader
hasn't been able to load the chunk.
-
Method Summary
Modifier and Type Method Description void
fillBiomes(Biome[] biomes, int chunkX, int chunkZ)
void
generateChunkData(ChunkBatch batch, int chunkX, int chunkZ)
Called when the blocks in theChunk
should be set usingBlockModifier.setBlock(int, int, int, Block)
or similar.java.util.List<ChunkPopulator>
getPopulators()
Gets all theChunkPopulator
of this generator.
-
Method Details
-
generateChunkData
Called when the blocks in theChunk
should be set usingBlockModifier.setBlock(int, int, int, Block)
or similar.WARNING: all positions are chunk-based (0-15).
- Parameters:
batch
- theChunkBatch
which will be flush after the generationchunkX
- the chunk XchunkZ
- the chunk Z
-
fillBiomes
- Parameters:
biomes
- the array ofBiome
chunkX
- the chunk XchunkZ
- the chunk Z
-
getPopulators
java.util.List<ChunkPopulator> getPopulators()Gets all theChunkPopulator
of this generator.- Returns:
- a
List
ofChunkPopulator
-