Class FloraGenerator
java.lang.Object
com.sk89q.worldedit.function.generator.FloraGenerator
- All Implemented Interfaces:
Filter
,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.static Pattern
Get a pattern for plants to place inside a mushroom environment.static Pattern
Get a pattern for plants to place inside a nether environment.void
setBiomeAware
(boolean biomeAware) Set whether the generator is biome aware.static Pattern
Get a pattern for plants to place inside a nether environment.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.fastasyncworldedit.core.queue.Filter
appliesChunk, appliesLayer, applyChunk, finishChunk, fork, join
Methods inherited from interface com.sk89q.worldedit.function.RegionFunction
applyBlock
-
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
-
mushroomPattern
Get a pattern for plants to place inside a mushroom environment.- Returns:
- a pattern that places flora
-
netherPattern
Get a pattern for plants to place inside a nether environment.- Returns:
- a pattern that places flora
-
warpedNyliumPattern
Get a pattern for plants to place inside a nether 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
-