Class FleeEntityGoal<T extends LivingEntity>

java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.FleeEntityGoal<T>
Direct Known Subclasses:
CatEntity.CatFleeGoal, OcelotEntity.FleeGoal, PandaEntity.PandaFleeGoal, RabbitEntity.FleeGoal, WolfEntity.AvoidLlamaGoal

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

    • mob

      protected final PathAwareEntity mob
    • slowSpeed

      private final double slowSpeed
    • fastSpeed

      private final double fastSpeed
    • targetEntity

      protected T extends LivingEntity targetEntity
    • fleeDistance

      protected final float fleeDistance
    • fleePath

      protected Path fleePath
    • fleeingEntityNavigation

      protected final EntityNavigation fleeingEntityNavigation
    • classToFleeFrom

      protected final Class<T extends LivingEntity> classToFleeFrom
    • extraInclusionSelector

      protected final Predicate<LivingEntity> extraInclusionSelector
    • inclusionSelector

      protected final Predicate<LivingEntity> inclusionSelector
    • withinRangePredicate

      private final TargetPredicate withinRangePredicate
  • Constructor Details

  • Method Details

    • canStart

      public boolean canStart()
      Specified by:
      canStart in class Goal
    • shouldContinue

      public boolean shouldContinue()
      Overrides:
      shouldContinue 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