Class TemptGoal

java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.TemptGoal
Direct Known Subclasses:
CatEntity.TemptGoal, OcelotEntity.OcelotTemptGoal

public class TemptGoal
extends Goal
  • Field Details

    • TEMPTING_ENTITY_PREDICATE

      private static final TargetPredicate TEMPTING_ENTITY_PREDICATE
    • mob

      protected final PathAwareEntity mob
    • speed

      private final double speed
    • lastPlayerX

      private double lastPlayerX
    • lastPlayerY

      private double lastPlayerY
    • lastPlayerZ

      private double lastPlayerZ
    • lastPlayerPitch

      private double lastPlayerPitch
    • lastPlayerYaw

      private double lastPlayerYaw
    • closestPlayer

      protected PlayerEntity closestPlayer
    • cooldown

      private int cooldown
    • active

      private boolean active
    • food

      private final Ingredient food
    • canBeScared

      private final boolean canBeScared
  • Constructor Details

  • Method Details

    • canStart

      public boolean canStart()
      Specified by:
      canStart in class Goal
    • isTemptedBy

      protected boolean isTemptedBy​(ItemStack stack)
    • shouldContinue

      public boolean shouldContinue()
      Overrides:
      shouldContinue in class Goal
    • canBeScared

      protected boolean canBeScared()
    • 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
    • isActive

      public boolean isActive()