Class TemptGoal
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.TemptGoal
- Direct Known Subclasses:
Cat.CatTemptGoal,Ocelot.OcelotTemptGoal,TemptGoal.ForNonPathfinders
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate final booleanprivate static final doubleprivate booleanprotected final Mobprotected Playerprivate doubleprivate doubleprivate doubleprivate doubleprivate doubleprotected final doubleprivate final doubleprivate final TargetingConditionsprivate static final TargetingConditions -
Constructor Summary
ConstructorsConstructorDescriptionTemptGoal(Mob mob, double speedModifier, Predicate<ItemStack> items, boolean canScare, double stopDistance) TemptGoal(PathfinderMob mob, double speedModifier, Predicate<ItemStack> items, boolean canScare) TemptGoal(PathfinderMob mob, double speedModifier, Predicate<ItemStack> items, boolean canScare, double stopDistance) -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected booleancanScare()booleancanUse()booleanprotected voidnavigateTowards(Player player) private booleanshouldFollow(LivingEntity entity) voidstart()voidstop()protected voidvoidtick()Methods inherited from class net.minecraft.world.entity.ai.goal.Goal
adjustedTickDelay, getFlags, getServerLevel, getServerLevel, isInterruptable, reducedTickDelay, requiresUpdateEveryTick, setFlags, toString
-
Field Details
-
TEMPT_TARGETING
-
DEFAULT_STOP_DISTANCE
private static final double DEFAULT_STOP_DISTANCE- See Also:
-
targetingConditions
-
mob
-
speedModifier
protected final double speedModifier -
px
private double px -
py
private double py -
pz
private double pz -
pRotX
private double pRotX -
pRotY
private double pRotY -
player
-
calmDown
private int calmDown -
isRunning
private boolean isRunning -
items
-
canScare
private final boolean canScare -
stopDistance
private final double stopDistance
-
-
Constructor Details
-
TemptGoal
public TemptGoal(PathfinderMob mob, double speedModifier, Predicate<ItemStack> items, boolean canScare) -
TemptGoal
public TemptGoal(PathfinderMob mob, double speedModifier, Predicate<ItemStack> items, boolean canScare, double stopDistance) -
TemptGoal
-
-
Method Details
-
canUse
public boolean canUse() -
shouldFollow
-
canContinueToUse
public boolean canContinueToUse()- Overrides:
canContinueToUsein classGoal
-
canScare
protected boolean canScare() -
start
public void start() -
stop
public void stop() -
tick
public void tick() -
isRunning
public boolean isRunning()
-