Package net.minecraft.entity.ai.goal
Class FollowOwnerGoal
- java.lang.Object
-
- net.minecraft.entity.ai.goal.Goal
-
- net.minecraft.entity.ai.goal.FollowOwnerGoal
-
public class FollowOwnerGoal extends Goal
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
canFly
private IWorldReader
level
private PathNavigator
navigation
private float
oldWaterCost
private LivingEntity
owner
private double
speedModifier
private float
startDistance
private float
stopDistance
private TameableEntity
tamable
private int
timeToRecalcPath
-
Constructor Summary
Constructors Constructor Description FollowOwnerGoal(TameableEntity p_i225711_1_, double p_i225711_2_, float p_i225711_4_, float p_i225711_5_, boolean p_i225711_6_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canContinueToUse()
private boolean
canTeleportTo(BlockPos p_226329_1_)
boolean
canUse()
private boolean
maybeTeleportTo(int p_226328_1_, int p_226328_2_, int p_226328_3_)
private int
randomIntInclusive(int p_226327_1_, int p_226327_2_)
void
start()
void
stop()
private void
teleportToOwner()
void
tick()
-
Methods inherited from class net.minecraft.entity.ai.goal.Goal
getFlags, isInterruptable, setFlags, toString
-
-
-
-
Field Detail
-
tamable
private final TameableEntity tamable
-
owner
private LivingEntity owner
-
level
private final IWorldReader level
-
speedModifier
private final double speedModifier
-
navigation
private final PathNavigator navigation
-
timeToRecalcPath
private int timeToRecalcPath
-
stopDistance
private final float stopDistance
-
startDistance
private final float startDistance
-
oldWaterCost
private float oldWaterCost
-
canFly
private final boolean canFly
-
-
Constructor Detail
-
FollowOwnerGoal
public FollowOwnerGoal(TameableEntity p_i225711_1_, double p_i225711_2_, float p_i225711_4_, float p_i225711_5_, boolean p_i225711_6_)
-
-
Method Detail
-
canContinueToUse
public boolean canContinueToUse()
- Overrides:
canContinueToUse
in classGoal
-
teleportToOwner
private void teleportToOwner()
-
maybeTeleportTo
private boolean maybeTeleportTo(int p_226328_1_, int p_226328_2_, int p_226328_3_)
-
canTeleportTo
private boolean canTeleportTo(BlockPos p_226329_1_)
-
randomIntInclusive
private int randomIntInclusive(int p_226327_1_, int p_226327_2_)
-
-