static class TurtleEntity.ApproachFoodHoldingPlayerGoal extends Goal
Goal.Control
Modifier and Type | Field and Description |
---|---|
private Set<Item> |
attractiveItems |
private static TargetPredicate |
CLOSE_ENTITY_PREDICATE |
private int |
cooldown |
private double |
speed |
private PlayerEntity |
targetPlayer |
private TurtleEntity |
turtle |
Constructor and Description |
---|
ApproachFoodHoldingPlayerGoal(TurtleEntity turtle,
double speed,
Item attractiveItem) |
Modifier and Type | Method and Description |
---|---|
boolean |
canStart() |
private boolean |
isAttractive(ItemStack stack) |
boolean |
shouldContinue() |
void |
stop() |
void |
tick() |
canStop, getControls, setControls, start, toString
private static final TargetPredicate CLOSE_ENTITY_PREDICATE
private final TurtleEntity turtle
private final double speed
private PlayerEntity targetPlayer
private int cooldown
ApproachFoodHoldingPlayerGoal(TurtleEntity turtle, double speed, Item attractiveItem)
private boolean isAttractive(ItemStack stack)
public boolean shouldContinue()
shouldContinue
in class Goal