Class AvoidEntityGoal<T extends LivingEntity>

java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.AvoidEntityGoal<T>
Direct Known Subclasses:
Cat.CatAvoidEntityGoal, Ocelot.OcelotAvoidEntityGoal, Panda.PandaAvoidGoal, Rabbit.RabbitAvoidEntityGoal, Wolf.WolfAvoidEntityGoal

public class AvoidEntityGoal<T extends LivingEntity> extends Goal
  • Field Details

    • mob

      protected final PathfinderMob mob
    • walkSpeedModifier

      private final double walkSpeedModifier
    • sprintSpeedModifier

      private final double sprintSpeedModifier
    • toAvoid

      protected T extends LivingEntity toAvoid
    • maxDist

      protected final float maxDist
    • path

      protected Path path
    • pathNav

      protected final PathNavigation pathNav
    • avoidClass

      protected final Class<T extends LivingEntity> avoidClass
    • avoidPredicate

      protected final Predicate<LivingEntity> avoidPredicate
    • predicateOnAvoidEntity

      protected final Predicate<LivingEntity> predicateOnAvoidEntity
    • avoidEntityTargeting

      private final TargetingConditions avoidEntityTargeting
  • Constructor Details

  • Method Details

    • canUse

      public boolean canUse()
      Specified by:
      canUse in class Goal
    • canContinueToUse

      public boolean canContinueToUse()
      Overrides:
      canContinueToUse in class Goal
    • start

      public void start()
      Overrides:
      start in class Goal
    • stop

      public void stop()
      Overrides:
      stop in class Goal
    • tick

      public void tick()
      Overrides:
      tick in class Goal