public class TemptGoal extends Goal
Modifier and Type | Field and Description |
---|---|
protected PlayerEntity |
closestPlayer |
protected CreatureEntity |
creature |
private int |
delayTemptCounter |
private static EntityPredicate |
ENTITY_PREDICATE |
private boolean |
isRunning |
private double |
pitch |
private boolean |
scaredByPlayerMovement |
private double |
speed |
private double |
targetX |
private double |
targetY |
private double |
targetZ |
private Ingredient |
temptItem |
private double |
yaw |
Constructor and Description |
---|
TemptGoal(CreatureEntity creatureIn,
double speedIn,
boolean scaredByPlayerMovementIn,
Ingredient temptItemsIn) |
TemptGoal(CreatureEntity creatureIn,
double speedIn,
Ingredient temptItemsIn,
boolean scaredByPlayerMovementIn) |
Modifier and Type | Method and Description |
---|---|
boolean |
isRunning() |
protected boolean |
isScaredByPlayerMovement() |
protected boolean |
isTempting(ItemStack stack) |
void |
resetTask() |
boolean |
shouldContinueExecuting() |
boolean |
shouldExecute() |
void |
startExecuting() |
void |
tick() |
getMutexFlags, isPreemptible, setMutexFlags, toString
private static final EntityPredicate ENTITY_PREDICATE
protected final CreatureEntity creature
private final double speed
private double targetX
private double targetY
private double targetZ
private double pitch
private double yaw
protected PlayerEntity closestPlayer
private int delayTemptCounter
private boolean isRunning
private final Ingredient temptItem
private final boolean scaredByPlayerMovement
public TemptGoal(CreatureEntity creatureIn, double speedIn, Ingredient temptItemsIn, boolean scaredByPlayerMovementIn)
public TemptGoal(CreatureEntity creatureIn, double speedIn, boolean scaredByPlayerMovementIn, Ingredient temptItemsIn)
public boolean shouldExecute()
shouldExecute
in class Goal
protected boolean isTempting(ItemStack stack)
public boolean shouldContinueExecuting()
shouldContinueExecuting
in class Goal
protected boolean isScaredByPlayerMovement()
public void startExecuting()
startExecuting
in class Goal
public boolean isRunning()