Class FloraGenerator
java.lang.Object
com.sk89q.worldedit.function.generator.FloraGenerator
- All Implemented Interfaces:
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
apply
(BlockVector3 position) Apply the function to the given position.static Pattern
Get a pattern for plants to place inside a desert environment.static Pattern
Get a pattern for plants to place inside a temperate environment.boolean
Return whether the flora generator is set to be biome-aware.void
setBiomeAware
(boolean biomeAware) Set whether the generator is biome aware.
-
Constructor Details
-
FloraGenerator
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
Get a pattern for plants to place inside a desert environment.- Returns:
- a pattern that places flora
-
getTemperatePattern
Get a pattern for plants to place inside a temperate environment.- Returns:
- a pattern that places flora
-
apply
Description copied from interface:RegionFunction
Apply the function to the given position.- Specified by:
apply
in interfaceRegionFunction
- Parameters:
position
- the position- Returns:
- true if something was changed
- Throws:
WorldEditException
- thrown on an error
-