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 int
private final boolean
private static final double
private boolean
protected final Mob
protected Player
private double
private double
private double
private double
private double
protected final double
private final double
private final TargetingConditions
private 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 TypeMethodDescriptionboolean
protected boolean
canScare()
boolean
canUse()
boolean
protected void
navigateTowards
(Player pPlayer) private boolean
shouldFollow
(LivingEntity pEntity) void
start()
void
stop()
protected void
void
tick()
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:
canContinueToUse
in classGoal
-
canScare
protected boolean canScare() -
start
public void start() -
stop
public void stop() -
tick
public void tick() -
isRunning
public boolean isRunning()
-