Interface PlantGrowEvent
- All Superinterfaces:
Cancellable, Event, FarmingEvent
Fired when a plant is about to grow: a crop reaching its next stage, a cane growing one block
taller, a stem bearing a fruit.
FarmingEvent.position() is the plant growing, and FarmingEvent.block()
its state before it grows.
Changing the grown state changes what the plant turns into. Cancelling the event leaves the plant as it is; it tries again on a later random tick, or the next time it is fertilized.
- Since:
- 0.1.0
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbooleanReturnstrueif a fertilizer causes the growth,falseif the plant grows on its own.grown()Returns the state about to be written attarget().voidSets the state written attarget()once the event is over, in place of the one the plant chose.target()Returns where the grown state is about to be written.Methods inherited from interface Cancellable
isCancelled, setCancelledMethods inherited from interface FarmingEvent
block, position, world
-
Method Details
-
target
BlockPosition target()Returns where the grown state is about to be written.:FarmingEvent.position()for a plant growing in place, another block for a plant growing taller or bearing a fruit- Returns:
- where the grown state is about to be written
- Since:
- 0.1.0
-
grown
-
setGrown
-
fertilized
boolean fertilized()Returnstrueif a fertilizer causes the growth,falseif the plant grows on its own.- Returns:
trueif a fertilizer causes the growth,falseif the plant grows on its own- Since:
- 0.1.0
-