Package net.minecraft.entity.ai.goal
Class TemptGoal
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.TemptGoal
- Direct Known Subclasses:
CatEntity.TemptGoal
,OcelotEntity.OcelotTemptGoal
public class TemptGoal extends Goal
-
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
active
private boolean
canBeScared
protected PlayerEntity
closestPlayer
private int
cooldown
private Ingredient
food
private double
lastPlayerPitch
private double
lastPlayerX
private double
lastPlayerY
private double
lastPlayerYaw
private double
lastPlayerZ
protected PathAwareEntity
mob
private double
speed
private static TargetPredicate
TEMPTING_ENTITY_PREDICATE
-
Constructor Summary
Constructors Constructor Description TemptGoal(PathAwareEntity mob, double speed, boolean canBeScared, Ingredient food)
TemptGoal(PathAwareEntity mob, double speed, Ingredient food, boolean canBeScared)
-
Method Summary
Modifier and Type Method Description protected boolean
canBeScared()
boolean
canStart()
boolean
isActive()
protected boolean
isTemptedBy(ItemStack stack)
boolean
shouldContinue()
void
start()
void
stop()
void
tick()
Methods inherited from class net.minecraft.entity.ai.goal.Goal
canStop, getControls, setControls, toString
-
Field Details
-
TEMPTING_ENTITY_PREDICATE
-
mob
-
speed
private final double speed -
lastPlayerX
private double lastPlayerX -
lastPlayerY
private double lastPlayerY -
lastPlayerZ
private double lastPlayerZ -
lastPlayerPitch
private double lastPlayerPitch -
lastPlayerYaw
private double lastPlayerYaw -
closestPlayer
-
cooldown
private int cooldown -
active
private boolean active -
food
-
canBeScared
private final boolean canBeScared
-
-
Constructor Details
-
TemptGoal
-
TemptGoal
-
-
Method Details
-
canStart
public boolean canStart() -
isTemptedBy
-
shouldContinue
public boolean shouldContinue()- Overrides:
shouldContinue
in classGoal
-
canBeScared
protected boolean canBeScared() -
start
public void start() -
stop
public void stop() -
tick
public void tick() -
isActive
public boolean isActive()
-