Class FollowOwnerGoal

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

public class FollowOwnerGoal
extends Goal
  • Field Details

    • tameable

      private final TameableEntity tameable
    • owner

      private LivingEntity owner
    • world

      private final WorldView world
    • speed

      private final double speed
    • updateCountdownTicks

      private int updateCountdownTicks
    • maxDistance

      private final float maxDistance
    • minDistance

      private final float minDistance
    • oldWaterPathfindingPenalty

      private float oldWaterPathfindingPenalty
    • leavesAllowed

      private final boolean leavesAllowed
  • Constructor Details

    • FollowOwnerGoal

      public FollowOwnerGoal​(TameableEntity tameable, double speed, float minDistance, float maxDistance, boolean leavesAllowed)
  • 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
    • tryTeleport

      private void tryTeleport()
    • tryTeleportTo

      private boolean tryTeleportTo​(int x, int y, int z)
    • canTeleportTo

      private boolean canTeleportTo​(BlockPos pos)
    • getRandomInt

      private int getRandomInt​(int min, int max)