Package net.minecraft.entity.ai.goal
Class RevengeGoal
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.TrackTargetGoal
net.minecraft.entity.ai.goal.RevengeGoal
- Direct Known Subclasses:
BeeEntity.BeeRevengeGoal
,LlamaEntity.SpitRevengeGoal
,PandaEntity.PandaRevengeGoal
,PolarBearEntity.PolarBearRevengeGoal
public class RevengeGoal extends TrackTargetGoal
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.goal.Goal
Goal.Control
-
Field Summary
Fields Modifier and Type Field Description private boolean
groupRevenge
private int
lastAttackedTime
private Class<?>[]
noHelpTypes
private Class<?>[]
noRevengeTypes
private static TargetPredicate
VALID_AVOIDABLES_PREDICATE
Fields inherited from class net.minecraft.entity.ai.goal.TrackTargetGoal
checkVisibility, maxTimeWithoutVisibility, mob, target
-
Constructor Summary
Constructors Constructor Description RevengeGoal(PathAwareEntity mob, Class<?>[] noRevengeTypes)
-
Method Summary
Modifier and Type Method Description protected void
callSameTypeForRevenge()
boolean
canStart()
RevengeGoal
setGroupRevenge(Class<?>[] noHelpTypes)
protected void
setMobEntityTarget(MobEntity mob, LivingEntity target)
void
start()
Methods inherited from class net.minecraft.entity.ai.goal.TrackTargetGoal
canTrack, getFollowRange, setMaxTimeWithoutVisibility, shouldContinue, stop
Methods inherited from class net.minecraft.entity.ai.goal.Goal
canStop, getControls, setControls, tick, toString
-
Field Details
-
VALID_AVOIDABLES_PREDICATE
-
groupRevenge
private boolean groupRevenge -
lastAttackedTime
private int lastAttackedTime -
noRevengeTypes
-
noHelpTypes
-
-
Constructor Details
-
RevengeGoal
-
-
Method Details
-
canStart
public boolean canStart() -
setGroupRevenge
-
start
public void start()- Overrides:
start
in classTrackTargetGoal
-
callSameTypeForRevenge
protected void callSameTypeForRevenge() -
setMobEntityTarget
-