public class GardenPatchGenerator extends java.lang.Object implements RegionFunction
Constructor and Description |
---|
GardenPatchGenerator(EditSession editSession)
Create a new instance.
|
Modifier and Type | Method and Description |
---|---|
boolean |
apply(BlockVector3 position)
Apply the function to the given position.
|
int |
getAffected()
Get the number of affected blocks.
|
static Pattern |
getMelonPattern()
Get a pattern that creates melons.
|
Pattern |
getPlant()
Get the plant pattern that is placed.
|
static Pattern |
getPumpkinPattern()
Get a pattern that creates pumpkins with different faces.
|
void |
setPlant(Pattern plant)
Set the plant pattern that is placed.
|
public GardenPatchGenerator(EditSession editSession)
editSession
- the edit sessionpublic Pattern getPlant()
public void setPlant(Pattern plant)
plant
- the plant patternpublic int getAffected()
public boolean apply(BlockVector3 position) throws WorldEditException
RegionFunction
apply
in interface RegionFunction
position
- the positionWorldEditException
- thrown on an errorpublic static Pattern getPumpkinPattern()
public static Pattern getMelonPattern()