Class FollowOwnerGoal
java.lang.Object
net.minecraft.world.entity.ai.goal.Goal
net.minecraft.world.entity.ai.goal.FollowOwnerGoal
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate LevelReaderprivate static intprivate static intprivate static intprivate PathNavigationprivate floatprivate LivingEntityprivate doubleprivate floatprivate floatprivate TamableAnimalstatic intprivate int -
Constructor Summary
ConstructorsConstructorDescriptionFollowOwnerGoal(TamableAnimal p_25294_, double p_25295_, float p_25296_, float p_25297_, boolean p_25298_) -
Method Summary
Modifier and TypeMethodDescriptionbooleanprivate booleancanTeleportTo(BlockPos p_25308_)booleancanUse()private booleanmaybeTeleportTo(int p_25304_, int p_25305_, int p_25306_)private intrandomIntInclusive(int p_25301_, int p_25302_)voidstart()voidstop()private voidvoidtick()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:
canContinueToUsein 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_)
-