Class PanicGoal

java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.PanicGoal
Direct Known Subclasses:
Fox.FoxPanicGoal, Panda.PandaPanicGoal, PolarBear.PolarBearPanicGoal, Rabbit.RabbitPanicGoal, Turtle.TurtlePanicGoal, Wolf.WolfPanicGoal

public class PanicGoal extends Goal
  • Field Details

    • WATER_CHECK_DISTANCE_VERTICAL

      public static final int WATER_CHECK_DISTANCE_VERTICAL
      See Also:
    • mob

      protected final PathfinderMob mob
    • speedModifier

      protected final double speedModifier
    • posX

      protected double posX
    • posY

      protected double posY
    • posZ

      protected double posZ
    • isRunning

      protected boolean isRunning
  • Constructor Details

    • PanicGoal

      public PanicGoal(PathfinderMob p_25691_, double p_25692_)
  • Method Details

    • canUse

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

      protected boolean shouldPanic()
    • findRandomPosition

      protected boolean findRandomPosition()
    • isRunning

      public boolean isRunning()
    • start

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

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

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

      @Nullable protected BlockPos lookForWater(BlockGetter p_198173_, Entity p_198174_, int p_198175_)