Class SprayableEntity.EscapeSprayGoal<T extends net.minecraft.entity.mob.PathAwareEntity & SprayableEntity>
java.lang.Object
net.minecraft.entity.ai.goal.Goal
dev.jaxydog.astral.utility.injected.SprayableEntity.EscapeSprayGoal<T>
- Type Parameters:
T- The entity type.
- Enclosing interface:
SprayableEntity
public static class SprayableEntity.EscapeSprayGoal<T extends net.minecraft.entity.mob.PathAwareEntity & SprayableEntity>
extends net.minecraft.entity.ai.goal.Goal
A goal that causes a sprayed entity to run away from its sprayer.
- Since:
- 1.6.0
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.Goal.Control -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionEscapeSprayGoal(T entity, double speed) Creates a newSprayableEntity.EscapeSprayGoal. -
Method Summary
Methods inherited from class net.minecraft.entity.ai.goal.Goal
canStop, getControls, getTickCount, setControls, shouldRunEveryTick, tick, toGoalTicks, toString
-
Field Details
-
entity
The entity instance.- Since:
- 1.6.0
-
speed
protected final double speedThe speed at which to run.- Since:
- 1.6.0
-
path
@Nullable protected @Nullable net.minecraft.entity.ai.pathing.Path pathThe movement path.- Since:
- 1.6.0
-
-
Constructor Details
-
EscapeSprayGoal
Creates a newSprayableEntity.EscapeSprayGoal.- Parameters:
entity- The entity instance.speed- The speed at which to run.- Since:
- 1.6.0
-
-
Method Details
-
findTarget
protected boolean findTarget()Attempts to find a location to run towards.- Returns:
- Whether a target path was found.
- Since:
- 1.6.0
-
canStart
public boolean canStart()- Specified by:
canStartin classnet.minecraft.entity.ai.goal.Goal
-
start
public void start()- Overrides:
startin classnet.minecraft.entity.ai.goal.Goal
-
shouldContinue
public boolean shouldContinue()- Overrides:
shouldContinuein classnet.minecraft.entity.ai.goal.Goal
-
stop
public void stop()- Overrides:
stopin classnet.minecraft.entity.ai.goal.Goal
-