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 pMob, double pSpeedModifier, Predicate<ItemStack> pItems, boolean pCanScare, double pStopDistance) TemptGoal(PathfinderMob pMob, double pSpeedModifier, Predicate<ItemStack> pItems, boolean pCanScare) TemptGoal(PathfinderMob pMob, double pSpeedModifier, Predicate<ItemStack> pItems, boolean pCanScare, double pStopDistance) -
Method Summary
Modifier and TypeMethodDescriptionbooleanprotected booleancanScare()booleancanUse()booleanprotected voidnavigateTowards(Player pPlayer) private booleanshouldFollow(LivingEntity pEntity) 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 pMob, double pSpeedModifier, Predicate<ItemStack> pItems, boolean pCanScare) -
TemptGoal
public TemptGoal(PathfinderMob pMob, double pSpeedModifier, Predicate<ItemStack> pItems, boolean pCanScare, double pStopDistance) -
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()
-