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 booleancanFlyprivate IWorldReaderlevelprivate PathNavigatornavigationprivate floatoldWaterCostprivate LivingEntityownerprivate doublespeedModifierprivate floatstartDistanceprivate floatstopDistanceprivate TameableEntitytamableprivate inttimeToRecalcPath
-
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 booleancanContinueToUse()private booleancanTeleportTo(BlockPos p_226329_1_)booleancanUse()private booleanmaybeTeleportTo(int p_226328_1_, int p_226328_2_, int p_226328_3_)private intrandomIntInclusive(int p_226327_1_, int p_226327_2_)voidstart()voidstop()private voidteleportToOwner()voidtick()-
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:
canContinueToUsein 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_)
-
-