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

public class HeightSelectionDecorator extends AbstractGenerationPass implements Decorator
Similar to SurfaceDecorator, but switches between two different decorators based on the elevation of the highest block in the chunk.
Author:
DaPorkchop_
  • Field Details

    • ID

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

      protected net.daporkchop.lib.noise.NoiseSource threshold
    • additionalOffset

      protected double additionalOffset
    • below

      protected Decorator[] below
    • above

      protected Decorator[] above
    • thresholdNoise

      protected NoiseGenerator thresholdNoise
    • addSeaLevelToOffset

      protected boolean addSeaLevelToOffset
  • Constructor Details

    • HeightSelectionDecorator

      public HeightSelectionDecorator()
  • 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