Class GardenPatchGenerator
java.lang.Object
com.sk89q.worldedit.function.generator.GardenPatchGenerator
- All Implemented Interfaces:
Filter
,RegionFunction
Generates patches of fruit (i.e. pumpkin patches).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
apply
(BlockVector3 position) Apply the function to the given position.int
Get the number of affected blocks.static Pattern
Get a pattern that creates melons.getPlant()
Get the plant pattern that is placed.static Pattern
Get a pattern that creates pumpkins with different faces.void
Set the plant pattern that is placed.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
-
GardenPatchGenerator
Create a new instance.- Parameters:
editSession
- the edit session
-
-
Method Details
-
getPlant
Get the plant pattern that is placed.- Returns:
- the plant pattern
-
setPlant
Set the plant pattern that is placed.- Parameters:
plant
- the plant pattern
-
getAffected
public int getAffected()Get the number of affected blocks.- Returns:
- affected count
-
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
-
getPumpkinPattern
Get a pattern that creates pumpkins with different faces.- Returns:
- a pumpkin pattern
-
getMelonPattern
Get a pattern that creates melons.- Returns:
- a melon pattern
-