Class NoiseSelectionPopulator

java.lang.Object
org.cloudburstmc.server.level.generator.standard.misc.AbstractGenerationPass
org.cloudburstmc.server.level.generator.standard.population.NoiseSelectionPopulator
All Implemented Interfaces:
Finisher, GenerationPass, Populator

public class NoiseSelectionPopulator extends AbstractGenerationPass implements Populator
Similar to SurfaceDecorator, but switches between two different populators based on the output of a noise function.
Author:
DaPorkchop_
  • Field Details

    • ID

      public static final org.cloudburstmc.api.util.Identifier ID
    • selector

      protected net.daporkchop.lib.noise.NoiseSource selector
    • randomFactor

      protected double randomFactor
    • min

      protected double min
    • max

      protected double max
    • below

      protected Populator[] below
    • above

      protected Populator[] above
    • in

      protected Populator[] in
    • selectorNoise

      protected NoiseGenerator selectorNoise
  • Constructor Details

    • NoiseSelectionPopulator

      public NoiseSelectionPopulator()
  • Method Details

    • init0

      protected void init0(long levelSeed, long localSeed, StandardGenerator generator)
      Overrides:
      init0 in class AbstractGenerationPass
    • populate

      public void populate(net.daporkchop.lib.random.PRandom random, org.cloudburstmc.api.level.ChunkManager level, int blockX, int blockZ)
      Description copied from interface: Populator
      Populates a given chunk.
      Specified by:
      populate in interface Populator
      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
      blockX - the X coordinate of the block column to populate
      blockZ - the Z coordinate of the block column to populate
    • getId

      public org.cloudburstmc.api.util.Identifier getId()
      Specified by:
      getId in interface Finisher
      Specified by:
      getId in interface GenerationPass
      Specified by:
      getId in interface Populator
      Returns:
      the identifier of this generation pass