public class TemptGoal extends Goal
Goal.Control
Modifier and Type | Field and 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 and Description |
---|
TemptGoal(PathAwareEntity mob,
double speed,
boolean canBeScared,
Ingredient food) |
TemptGoal(PathAwareEntity mob,
double speed,
Ingredient food,
boolean canBeScared) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canBeScared() |
boolean |
canStart() |
boolean |
isActive() |
protected boolean |
isTemptedBy(ItemStack stack) |
boolean |
shouldContinue() |
void |
start() |
void |
stop() |
void |
tick() |
canStop, getControls, setControls, toString
private static final TargetPredicate TEMPTING_ENTITY_PREDICATE
protected final PathAwareEntity mob
private final double speed
private double lastPlayerX
private double lastPlayerY
private double lastPlayerZ
private double lastPlayerPitch
private double lastPlayerYaw
protected PlayerEntity closestPlayer
private int cooldown
private boolean active
private final Ingredient food
private final boolean canBeScared
public TemptGoal(PathAwareEntity mob, double speed, Ingredient food, boolean canBeScared)
public TemptGoal(PathAwareEntity mob, double speed, boolean canBeScared, Ingredient food)
protected boolean isTemptedBy(ItemStack stack)
public boolean shouldContinue()
shouldContinue
in class Goal
protected boolean canBeScared()
public boolean isActive()