Module gomint.api

Class LayeredGenerator


  • public class LayeredGenerator
    extends ChunkGenerator
    Version:
    1.0
    Author:
    geNAZt
    • Constructor Detail

      • LayeredGenerator

        public LayeredGenerator​(World world,
                                GeneratorContext context)
        Create a new chunk generator
        Parameters:
        world - for which this generator should generate chunks
        context - with which this generator should generate chunks
    • Method Detail

      • generate

        public Chunk generate​(int x,
                              int z)
        Description copied from class: ChunkGenerator
        Generate a chunk at the given coordinates. You have to return a fully built chunk, you can request one with World.generateEmptyChunk(int, int)
        Specified by:
        generate in class ChunkGenerator
        Parameters:
        x - coordinate of the chunk
        z - coordinate of the chunk
        Returns:
        proper populated chunk
      • getSpawnPoint

        public BlockPosition getSpawnPoint()
        Description copied from class: ChunkGenerator
        When you generate a new world using this chunk generator this method returns the worlds spawn. At this stage no blocks are loaded.
        Specified by:
        getSpawnPoint in class ChunkGenerator
        Returns:
        block position of the spawn of this new world
      • populate

        public void populate​(Chunk chunk)
        Description copied from class: ChunkGenerator
        Populate (generate additional objects) for the given chunk
        Specified by:
        populate in class ChunkGenerator
        Parameters:
        chunk - which should be populated