Class MoveToBlockGoal

java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.MoveToBlockGoal
Direct Known Subclasses:
BreakBlockGoal, CatLieOnBedGoal, CatSitOnBlockGoal, DrownedEntity.GoToBeachGoal, FoxEntity.EatBerriesGoal, RabbitEntity.RaidFarmGoal, StriderEntity.MoveToLavaGoal, TurtleEntity.GoToWaterGoal, TurtleEntity.LayEggGoal

public abstract class MoveToBlockGoal extends Goal
  • Field Details

    • mob

      protected final CreatureEntity mob
    • speedModifier

      public final double speedModifier
    • nextStartTick

      protected int nextStartTick
    • tryTicks

      protected int tryTicks
    • maxStayTicks

      private int maxStayTicks
    • blockPos

      protected BlockPos blockPos
    • reachedTarget

      private boolean reachedTarget
    • searchRange

      private final int searchRange
    • verticalSearchRange

      private final int verticalSearchRange
    • verticalSearchStart

      protected int verticalSearchStart
  • Constructor Details

    • MoveToBlockGoal

      public MoveToBlockGoal(CreatureEntity p_i45888_1_, double p_i45888_2_, int p_i45888_4_)
    • MoveToBlockGoal

      public MoveToBlockGoal(CreatureEntity p_i48796_1_, double p_i48796_2_, int p_i48796_4_, int p_i48796_5_)
  • Method Details

    • canUse

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

      protected int nextStartTick(CreatureEntity p_203109_1_)
    • canContinueToUse

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

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

      protected void moveMobToBlock()
    • acceptedDistance

      public double acceptedDistance()
    • getMoveToTarget

      protected BlockPos getMoveToTarget()
    • tick

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

      public boolean shouldRecalculatePath()
    • isReachedTarget

      protected boolean isReachedTarget()
    • findNearestBlock

      protected boolean findNearestBlock()
    • isValidTarget

      protected abstract boolean isValidTarget(IWorldReader p_179488_1_, BlockPos p_179488_2_)