Class HurtByTargetGoal

Direct Known Subclasses:
Bee.BeeHurtByOtherGoal, Llama.LlamaHurtByTargetGoal, Panda.PandaHurtByTargetGoal, PolarBear.PolarBearHurtByTargetGoal

public class HurtByTargetGoal extends TargetGoal
  • Field Details

    • HURT_BY_TARGETING

      private static final TargetingConditions HURT_BY_TARGETING
    • ALERT_RANGE_Y

      private static final int ALERT_RANGE_Y
      See Also:
    • alertSameType

      private boolean alertSameType
    • timestamp

      private int timestamp
      Store the previous revengeTimer value
    • toIgnoreDamage

      private final Class<?>[] toIgnoreDamage
    • toIgnoreAlert

      @Nullable private Class<?>[] toIgnoreAlert
  • Constructor Details

    • HurtByTargetGoal

      public HurtByTargetGoal(PathfinderMob pMob, Class<?>... pToIgnoreDamage)
  • Method Details

    • canUse

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

      public HurtByTargetGoal setAlertOthers(Class<?>... pReinforcementTypes)
    • start

      public void start()
      Overrides:
      start in class TargetGoal
    • alertOthers

      protected void alertOthers()
    • alertOther

      protected void alertOther(Mob pMob, LivingEntity pTarget)