java.lang.Object
org.cloudburstmc.server.level.generator.standard.misc.AbstractGenerationPass
org.cloudburstmc.server.level.generator.standard.generation.decorator.NoiseSelectionDecorator
All Implemented Interfaces:
Finisher, Decorator, GenerationPass, Populator

public class NoiseSelectionDecorator extends AbstractGenerationPass implements Decorator
Similar to SurfaceDecorator, but switches between two different decorators 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 Decorator[] below
    • above

      protected Decorator[] above
    • in

      protected Decorator[] in
    • selectorNoise

      protected NoiseGenerator selectorNoise
  • Constructor Details

    • NoiseSelectionDecorator

      public NoiseSelectionDecorator()
  • Method Details

    • init0

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

      public void decorate(net.daporkchop.lib.random.PRandom random, org.cloudburstmc.api.level.chunk.Chunk chunk, int x, int z)
      Description copied from interface: Decorator
      Decorates a given chunk.
      Specified by:
      decorate in interface Decorator
      Parameters:
      random - an instance of PRandom for generating random numbers, initialized with a seed based on chunk's position
      chunk - the chunk to be decorated
      x - the X coordinate of the block column in the chunk to decorate
      z - the Z coordinate of the block column in the chunk to decorate
    • getId

      public org.cloudburstmc.api.util.Identifier getId()
      Specified by:
      getId in interface Decorator
      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