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 final boolean
private final LevelReader
private static final int
private static final int
private static final int
private final PathNavigation
private float
private LivingEntity
private final double
private final float
private final float
private final TamableAnimal
static final 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
adjustedTickDelay, getFlags, isInterruptable, reducedTickDelay, requiresUpdateEveryTick, setFlags, toString
-
Field Details
-
TELEPORT_WHEN_DISTANCE_IS
public static final int TELEPORT_WHEN_DISTANCE_IS- See Also:
-
MIN_HORIZONTAL_DISTANCE_FROM_PLAYER_WHEN_TELEPORTING
private static final int MIN_HORIZONTAL_DISTANCE_FROM_PLAYER_WHEN_TELEPORTING- See Also:
-
MAX_HORIZONTAL_DISTANCE_FROM_PLAYER_WHEN_TELEPORTING
private static final int MAX_HORIZONTAL_DISTANCE_FROM_PLAYER_WHEN_TELEPORTING- See Also:
-
MAX_VERTICAL_DISTANCE_FROM_PLAYER_WHEN_TELEPORTING
private static final int MAX_VERTICAL_DISTANCE_FROM_PLAYER_WHEN_TELEPORTING- See Also:
-
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_)
-