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 booleangroupRevengeprivate intlastAttackedTimeprivate Class<?>[]noHelpTypesprivate Class<?>[]noRevengeTypesprivate static TargetPredicateVALID_AVOIDABLES_PREDICATEFields 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 voidcallSameTypeForRevenge()booleancanStart()RevengeGoalsetGroupRevenge(Class<?>[] noHelpTypes)protected voidsetMobEntityTarget(MobEntity mob, LivingEntity target)voidstart()Methods inherited from class net.minecraft.entity.ai.goal.TrackTargetGoal
canTrack, getFollowRange, setMaxTimeWithoutVisibility, shouldContinue, stopMethods 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:
startin classTrackTargetGoal
-
callSameTypeForRevenge
protected void callSameTypeForRevenge() -
setMobEntityTarget
-