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

public class ScatteredCoverDecorator extends Object implements Decorator
Places a random number of single blocks on top of a given cover block.
Author:
DaPorkchop_
  • Field Details

    • ID

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

      protected double chance
    • on

      protected BlockFilter on
    • replace

      protected BlockFilter replace
    • block

      protected BlockSelector block
  • Constructor Details

    • ScatteredCoverDecorator

      public ScatteredCoverDecorator()
  • Method Details

    • init

      public void init(long levelSeed, long localSeed, StandardGenerator generator)
      Description copied from interface: GenerationPass
      Prepares this instance for actual generation.
      Specified by:
      init in interface GenerationPass
      Parameters:
      levelSeed - the level seed, as defined in cloudburst.yml
      localSeed - a seed defined specifically for this generation pass
      generator - the instance of StandardGenerator that this generation pass will be used by
    • 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