Class LookAtPlayerGoal

java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.LookAtPlayerGoal
Direct Known Subclasses:
Fox.FoxLookAtPlayerGoal, InteractGoal, LookAtTradingPlayerGoal, Panda.PandaLookAtPlayerGoal

public class LookAtPlayerGoal extends Goal
  • Field Details

    • DEFAULT_PROBABILITY

      public static final float DEFAULT_PROBABILITY
      See Also:
    • mob

      protected final Mob mob
    • lookAt

      @Nullable protected Entity lookAt
    • lookDistance

      protected final float lookDistance
    • lookTime

      private int lookTime
    • probability

      protected final float probability
    • onlyHorizontal

      private final boolean onlyHorizontal
    • lookAtType

      protected final Class<? extends LivingEntity> lookAtType
    • lookAtContext

      protected final TargetingConditions lookAtContext
  • Constructor Details

    • LookAtPlayerGoal

      public LookAtPlayerGoal(Mob p_25520_, Class<? extends LivingEntity> p_25521_, float p_25522_)
    • LookAtPlayerGoal

      public LookAtPlayerGoal(Mob p_25524_, Class<? extends LivingEntity> p_25525_, float p_25526_, float p_25527_)
    • LookAtPlayerGoal

      public LookAtPlayerGoal(Mob p_148118_, Class<? extends LivingEntity> p_148119_, float p_148120_, float p_148121_, boolean p_148122_)
  • Method Details

    • canUse

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

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