Package net.minecraft.entity.ai.goal
Class HurtByTargetGoal
- java.lang.Object
-
- net.minecraft.entity.ai.goal.Goal
-
- net.minecraft.entity.ai.goal.TargetGoal
-
- net.minecraft.entity.ai.goal.HurtByTargetGoal
-
- Direct Known Subclasses:
BeeEntity.AngerGoal
,LlamaEntity.HurtByTargetGoal
,PandaEntity.RevengeGoal
,PolarBearEntity.HurtByTargetGoal
public class HurtByTargetGoal extends TargetGoal
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
alertSameType
private static EntityPredicate
HURT_BY_TARGETING
private int
timestamp
private java.lang.Class<?>[]
toIgnoreAlert
private java.lang.Class<?>[]
toIgnoreDamage
-
Fields inherited from class net.minecraft.entity.ai.goal.TargetGoal
mob, mustSee, targetMob, unseenMemoryTicks
-
-
Constructor Summary
Constructors Constructor Description HurtByTargetGoal(CreatureEntity p_i50317_1_, java.lang.Class<?>... p_i50317_2_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
alertOther(MobEntity p_220793_1_, LivingEntity p_220793_2_)
protected void
alertOthers()
boolean
canUse()
HurtByTargetGoal
setAlertOthers(java.lang.Class<?>... p_220794_1_)
void
start()
-
Methods inherited from class net.minecraft.entity.ai.goal.TargetGoal
canAttack, canContinueToUse, getFollowDistance, setUnseenMemoryTicks, stop
-
-
-
-
Field Detail
-
HURT_BY_TARGETING
private static final EntityPredicate HURT_BY_TARGETING
-
alertSameType
private boolean alertSameType
-
timestamp
private int timestamp
-
toIgnoreDamage
private final java.lang.Class<?>[] toIgnoreDamage
-
toIgnoreAlert
private java.lang.Class<?>[] toIgnoreAlert
-
-
Constructor Detail
-
HurtByTargetGoal
public HurtByTargetGoal(CreatureEntity p_i50317_1_, java.lang.Class<?>... p_i50317_2_)
-
-
Method Detail
-
setAlertOthers
public HurtByTargetGoal setAlertOthers(java.lang.Class<?>... p_220794_1_)
-
start
public void start()
- Overrides:
start
in classTargetGoal
-
alertOthers
protected void alertOthers()
-
alertOther
protected void alertOther(MobEntity p_220793_1_, LivingEntity p_220793_2_)
-
-