Class StandardGenerator

java.lang.Object
org.cloudburstmc.server.level.generator.standard.StandardGenerator
All Implemented Interfaces:
Generator

public final class StandardGenerator extends Object implements Generator
Main class of the Cloudburst Standard Generator.
Author:
DaPorkchop_
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static int
     
    static int
     
    static int
     
     
    static org.cloudburstmc.api.util.Identifier
     
    static int
     
    static int
     
    static int
     
    static double
     
    static double
     
    static double
     
    static int
     
    static int
     
    static int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    finish​(net.daporkchop.lib.random.PRandom random, org.cloudburstmc.api.level.ChunkManager level, int chunkX, int chunkZ)
    Finishes a given chunk.
    void
    generate​(net.daporkchop.lib.random.PRandom random, org.cloudburstmc.api.level.chunk.Chunk chunk, int chunkX, int chunkZ)
    Generates a given chunk.
    void
    populate​(net.daporkchop.lib.random.PRandom random, org.cloudburstmc.api.level.ChunkManager level, int chunkX, int chunkZ)
    Populates a given chunk.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • StandardGenerator

      public StandardGenerator()
  • Method Details

    • generate

      public void generate(net.daporkchop.lib.random.PRandom random, org.cloudburstmc.api.level.chunk.Chunk chunk, int chunkX, int chunkZ)
      Description copied from interface: Generator
      Generates a given chunk.
      Specified by:
      generate in interface Generator
      Parameters:
      random - an instance of PRandom for generating random numbers, initialized with a seed based on chunk's position
      chunk - the chunk to generate
      chunkX - the chunk's X coordinate
      chunkZ - the chunk's Z coordinate
    • populate

      public void populate(net.daporkchop.lib.random.PRandom random, org.cloudburstmc.api.level.ChunkManager level, int chunkX, int chunkZ)
      Description copied from interface: Generator
      Populates a given chunk.
      Specified by:
      populate in interface Generator
      Parameters:
      random - an instance of PRandom for generating random numbers, initialized with a seed based on chunk's position
      level - a ChunkManager containing only a 3x3 square of generated chunks, centered around the chunk being populated
      chunkX - the chunk's X coordinate
      chunkZ - the chunk's Z coordinate
    • finish

      public void finish(net.daporkchop.lib.random.PRandom random, org.cloudburstmc.api.level.ChunkManager level, int chunkX, int chunkZ)
      Description copied from interface: Generator
      Finishes a given chunk.

      This is identical in every respect to population, except it requires that the chunk and all of its neighbors have been populated rather than generated. This phase is intended for things like placing a layer of snow over cold biomes, where overlapping blocks from populated neighbors can cause inconsistent/unexpected results.

      Specified by:
      finish in interface Generator
      Parameters:
      random - an instance of PRandom for generating random numbers, initialized with a seed based on chunk's position
      level - a ChunkManager containing only a 3x3 square of generated chunks, centered around the chunk being populated
      chunkX - the chunk's X coordinate
      chunkZ - the chunk's Z coordinate