Class FollowOwnerGoal

java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.FollowOwnerGoal

public class FollowOwnerGoal extends Goal
  • Field Details

    • TELEPORT_WHEN_DISTANCE_IS

      public static final int TELEPORT_WHEN_DISTANCE_IS
      See Also:
    • MIN_HORIZONTAL_DISTANCE_FROM_PLAYER_WHEN_TELEPORTING

      private static final int MIN_HORIZONTAL_DISTANCE_FROM_PLAYER_WHEN_TELEPORTING
      See Also:
    • MAX_HORIZONTAL_DISTANCE_FROM_PLAYER_WHEN_TELEPORTING

      private static final int MAX_HORIZONTAL_DISTANCE_FROM_PLAYER_WHEN_TELEPORTING
      See Also:
    • MAX_VERTICAL_DISTANCE_FROM_PLAYER_WHEN_TELEPORTING

      private static final int MAX_VERTICAL_DISTANCE_FROM_PLAYER_WHEN_TELEPORTING
      See Also:
    • tamable

      private final TamableAnimal tamable
    • owner

      private LivingEntity owner
    • level

      private final LevelReader level
    • speedModifier

      private final double speedModifier
    • timeToRecalcPath

      private int timeToRecalcPath
    • stopDistance

      private final float stopDistance
    • startDistance

      private final float startDistance
    • oldWaterCost

      private float oldWaterCost
    • canFly

      private final boolean canFly
  • Constructor Details

    • FollowOwnerGoal

      public FollowOwnerGoal(TamableAnimal p_25294_, double p_25295_, float p_25296_, float p_25297_, boolean p_25298_)
  • Method Details

    • canUse

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

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

      private boolean unableToMove()
    • 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
    • teleportToOwner

      private void teleportToOwner()
    • maybeTeleportTo

      private boolean maybeTeleportTo(int p_25304_, int p_25305_, int p_25306_)
    • canTeleportTo

      private boolean canTeleportTo(BlockPos p_25308_)
    • randomIntInclusive

      private int randomIntInclusive(int p_25301_, int p_25302_)