public class FollowOwnerGoal extends Goal
Goal.Control
Modifier and Type | Field and Description |
---|---|
private boolean |
leavesAllowed |
private float |
maxDistance |
private float |
minDistance |
private EntityNavigation |
navigation |
private float |
oldWaterPathfindingPenalty |
private LivingEntity |
owner |
private double |
speed |
private TameableEntity |
tameable |
private int |
updateCountdownTicks |
private WorldView |
world |
Constructor and Description |
---|
FollowOwnerGoal(TameableEntity tameable,
double speed,
float minDistance,
float maxDistance,
boolean leavesAllowed) |
Modifier and Type | Method and Description |
---|---|
boolean |
canStart() |
private boolean |
canTeleportTo(BlockPos pos) |
private int |
getRandomInt(int min,
int max) |
boolean |
shouldContinue() |
void |
start() |
void |
stop() |
void |
tick() |
private void |
tryTeleport() |
private boolean |
tryTeleportTo(int x,
int y,
int z) |
canStop, getControls, setControls, toString
private final TameableEntity tameable
private LivingEntity owner
private final WorldView world
private final double speed
private final EntityNavigation navigation
private int updateCountdownTicks
private final float maxDistance
private final float minDistance
private float oldWaterPathfindingPenalty
private final boolean leavesAllowed
public FollowOwnerGoal(TameableEntity tameable, double speed, float minDistance, float maxDistance, boolean leavesAllowed)
public boolean shouldContinue()
shouldContinue
in class Goal
private void tryTeleport()
private boolean tryTeleportTo(int x, int y, int z)
private boolean canTeleportTo(BlockPos pos)
private int getRandomInt(int min, int max)