Class FollowOwnerGoal
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.FollowOwnerGoal
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionprivate boolean
private LevelReader
private static int
private static int
private static int
private PathNavigation
private float
private LivingEntity
private double
private float
private float
private TamableAnimal
static int
private int
-
Constructor Summary
ConstructorDescriptionFollowOwnerGoal(TamableAnimal p_25294_, double p_25295_, float p_25296_, float p_25297_, boolean p_25298_)
-
Method Summary
Modifier and TypeMethodDescriptionboolean
private boolean
canTeleportTo(BlockPos p_25308_)
boolean
canUse()
private boolean
maybeTeleportTo(int p_25304_, int p_25305_, int p_25306_)
private int
randomIntInclusive(int p_25301_, int p_25302_)
void
start()
void
stop()
private void
void
tick()
Methods inherited from class net.minecraft.world.entity.ai.goal.Goal
getFlags, isInterruptable, setFlags, toString
-
Field Details
-
TELEPORT_WHEN_DISTANCE_IS
public static final int TELEPORT_WHEN_DISTANCE_IS- See Also:
- Constant Field Values
-
MIN_HORIZONTAL_DISTANCE_FROM_PLAYER_WHEN_TELEPORTING
private static final int MIN_HORIZONTAL_DISTANCE_FROM_PLAYER_WHEN_TELEPORTING- See Also:
- Constant Field Values
-
MAX_HORIZONTAL_DISTANCE_FROM_PLAYER_WHEN_TELEPORTING
private static final int MAX_HORIZONTAL_DISTANCE_FROM_PLAYER_WHEN_TELEPORTING- See Also:
- Constant Field Values
-
MAX_VERTICAL_DISTANCE_FROM_PLAYER_WHEN_TELEPORTING
private static final int MAX_VERTICAL_DISTANCE_FROM_PLAYER_WHEN_TELEPORTING- See Also:
- Constant Field Values
-
tamable
-
owner
-
level
-
speedModifier
private final double speedModifier -
timeToRecalcPath
private int timeToRecalcPath -
stopDistance
private final float stopDistance -
startDistance
private final float startDistance -
oldWaterCost
private float oldWaterCost -
canFly
private final boolean canFly
-
-
Constructor Details
-
FollowOwnerGoal
public FollowOwnerGoal(TamableAnimal p_25294_, double p_25295_, float p_25296_, float p_25297_, boolean p_25298_)
-
-
Method Details
-
canUse
public boolean canUse() -
canContinueToUse
public boolean canContinueToUse()- Overrides:
canContinueToUse
in classGoal
-
start
public void start() -
stop
public void stop() -
tick
public void tick() -
teleportToOwner
private void teleportToOwner() -
maybeTeleportTo
private boolean maybeTeleportTo(int p_25304_, int p_25305_, int p_25306_) -
canTeleportTo
-
randomIntInclusive
private int randomIntInclusive(int p_25301_, int p_25302_)
-