public interface Goal<T extends Mob>
Modifier and Type | Method and Description |
---|---|
@NotNull GoalKey<T> |
getKey()
A unique key that identifies this type of goal.
|
@NotNull EnumSet<GoalType> |
getTypes()
Returns a list of all applicable flags for this goal.
This method is only called on construction. |
boolean |
shouldActivate()
Checks if this goal should be activated
|
default boolean |
shouldStayActive()
Checks if this goal should stay active, defaults to
shouldActivate() |
default void |
start()
Called when this goal gets activated
|
default void |
stop()
Called when this goal gets stopped
|
default void |
tick()
Called each tick the goal is activated
|
boolean shouldActivate()
default boolean shouldStayActive()
shouldActivate()
default void start()
default void stop()
default void tick()
@NotNull @NotNull GoalKey<T> getKey()
Copyright © 2021. All rights reserved.