Class RunToGroupGoal<T extends net.minecraft.world.entity.LivingEntity>
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
com.lightning.northstar.entity.goals.RunToGroupGoal<T>
public class RunToGroupGoal<T extends net.minecraft.world.entity.LivingEntity>
extends net.minecraft.world.entity.ai.goal.Goal
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.Goal.Flag -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final Predicate<net.minecraft.world.entity.LivingEntity> protected final floatprotected final net.minecraft.world.entity.PathfinderMobprotected @Nullable net.minecraft.world.level.pathfinder.Pathprotected final net.minecraft.world.entity.ai.navigation.PathNavigationprotected final Predicate<net.minecraft.world.entity.LivingEntity> protected T -
Constructor Summary
ConstructorsConstructorDescriptionRunToGroupGoal(net.minecraft.world.entity.PathfinderMob pMob, Class<T> pEntityClassToAvoid, float pMaxDistance, double pWalkSpeedModifier, double pSprintSpeedModifier) RunToGroupGoal(net.minecraft.world.entity.PathfinderMob pMob, Class<T> pEntityClassToAvoid, float pMaxDistance, double pWalkSpeedModifier, double pSprintSpeedModifier, Predicate<net.minecraft.world.entity.LivingEntity> pPredicateOnAvoidEntity) RunToGroupGoal(net.minecraft.world.entity.PathfinderMob pMob, Class<T> pEntityClassToAvoid, Predicate<net.minecraft.world.entity.LivingEntity> pAvoidPredicate, float pMaxDistance, double pWalkSpeedModifier, double pSprintSpeedModifier, Predicate<net.minecraft.world.entity.LivingEntity> pPredicateOnAvoidEntity) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns whether an in-progress EntityAIBase should continue executingbooleancanUse()voidstart()Execute a one shot task or start executing a continuous taskvoidstop()Reset the task's internal state.voidtick()Keep ticking a continuous task that has already been startedMethods inherited from class net.minecraft.world.entity.ai.goal.Goal
adjustedTickDelay, getFlags, isInterruptable, reducedTickDelay, requiresUpdateEveryTick, setFlags, toString
-
Field Details
-
mob
protected final net.minecraft.world.entity.PathfinderMob mob -
toAvoid
-
maxDist
protected final float maxDist -
path
@Nullable protected @Nullable net.minecraft.world.level.pathfinder.Path path -
avoidClass
-
avoidPredicate
-
predicateOnAvoidEntity
-
-
Constructor Details
-
RunToGroupGoal
-
RunToGroupGoal
public RunToGroupGoal(net.minecraft.world.entity.PathfinderMob pMob, Class<T> pEntityClassToAvoid, Predicate<net.minecraft.world.entity.LivingEntity> pAvoidPredicate, float pMaxDistance, double pWalkSpeedModifier, double pSprintSpeedModifier, Predicate<net.minecraft.world.entity.LivingEntity> pPredicateOnAvoidEntity) -
RunToGroupGoal
-
-
Method Details
-
canUse
public boolean canUse()- Specified by:
canUsein classnet.minecraft.world.entity.ai.goal.Goal
-
canContinueToUse
public boolean canContinueToUse()Returns whether an in-progress EntityAIBase should continue executing- Overrides:
canContinueToUsein classnet.minecraft.world.entity.ai.goal.Goal
-
start
public void start()Execute a one shot task or start executing a continuous task- Overrides:
startin classnet.minecraft.world.entity.ai.goal.Goal
-
stop
public void stop()Reset the task's internal state. Called when this task is interrupted by another one- Overrides:
stopin classnet.minecraft.world.entity.ai.goal.Goal
-
tick
public void tick()Keep ticking a continuous task that has already been started- Overrides:
tickin classnet.minecraft.world.entity.ai.goal.Goal
-