Class FloraGenerator

java.lang.Object
com.sk89q.worldedit.function.generator.FloraGenerator
All Implemented Interfaces:
RegionFunction

public class FloraGenerator extends Object implements RegionFunction
Generates flora (which may include tall grass, flowers, etc.).

The current implementation is not biome-aware, but it may become so in the future.

  • Constructor Details

    • FloraGenerator

      public FloraGenerator(EditSession editSession)
      Create a new flora generator.
      Parameters:
      editSession - the edit session
  • Method Details

    • isBiomeAware

      public boolean isBiomeAware()
      Return whether the flora generator is set to be biome-aware.

      By default, it is currently disabled by default, but this may change.

      Returns:
      true if biome aware
    • setBiomeAware

      public void setBiomeAware(boolean biomeAware)
      Set whether the generator is biome aware.

      It is currently not possible to make the generator biome-aware.

      Parameters:
      biomeAware - must always be false
    • getDesertPattern

      public static Pattern getDesertPattern()
      Get a pattern for plants to place inside a desert environment.
      Returns:
      a pattern that places flora
    • getTemperatePattern

      public static Pattern getTemperatePattern()
      Get a pattern for plants to place inside a temperate environment.
      Returns:
      a pattern that places flora
    • apply

      public boolean apply(BlockVector3 position) throws WorldEditException
      Description copied from interface: RegionFunction
      Apply the function to the given position.
      Specified by:
      apply in interface RegionFunction
      Parameters:
      position - the position
      Returns:
      true if something was changed
      Throws:
      WorldEditException - thrown on an error