Package net.minecraft.entity.ai.goal
Class MoveToTargetPosGoal
java.lang.Object
net.minecraft.entity.ai.goal.Goal
net.minecraft.entity.ai.goal.MoveToTargetPosGoal
- Direct Known Subclasses:
CatSitOnBlockGoal,DrownedEntity.LeaveWaterGoal,FoxEntity.EatSweetBerriesGoal,GoToOwnerAndPurrGoal,RabbitEntity.EatCarrotCropGoal,StepAndDestroyBlockGoal,StriderEntity.GoBackToLavaGoal,TurtleEntity.LayEggGoal,TurtleEntity.WanderInWaterGoal
public abstract class MoveToTargetPosGoal extends Goal
- Mappings:
Namespace Name official axlintermediary net/minecraft/class_1367named net/minecraft/entity/ai/goal/MoveToTargetPosGoal
-
Nested Class Summary
Nested classes/interfaces inherited from class net.minecraft.entity.ai.goal.Goal
Goal.Control -
Field Summary
Fields Modifier and Type Field Description protected intcooldownprotected intlowestYprivate intmaxYDifferenceprotected PathAwareEntitymobprivate intrangeprivate booleanreachedprivate intsafeWaitingTimedoublespeedprotected BlockPostargetPosprotected inttryingTime -
Constructor Summary
Constructors Constructor Description MoveToTargetPosGoal(PathAwareEntity mob, double speed, int range)MoveToTargetPosGoal(PathAwareEntity mob, double speed, int range, int maxYDifference) -
Method Summary
Modifier and Type Method Description booleancanStart()protected booleanfindTargetPos()doublegetDesiredSquaredDistanceToTarget()protected intgetInterval(PathAwareEntity mob)protected BlockPosgetTargetPos()protected booleanhasReached()protected abstract booleanisTargetPos(WorldView world, BlockPos pos)booleanshouldContinue()booleanshouldResetPath()voidstart()protected voidstartMovingToTarget()voidtick()Methods inherited from class net.minecraft.entity.ai.goal.Goal
canStop, getControls, setControls, stop, toString
-
Field Details
-
mob
- Mappings:
Namespace Name Mixin selector official aLaxl;a:Larq;intermediary field_6516Lnet/minecraft/class_1367;field_6516:Lnet/minecraft/class_1314;named mobLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;mob:Lnet/minecraft/entity/mob/PathAwareEntity;
-
speed
public final double speed- Mappings:
Namespace Name Mixin selector official bLaxl;b:Dintermediary field_6514Lnet/minecraft/class_1367;field_6514:Dnamed speedLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;speed:D
-
cooldown
protected int cooldown- Mappings:
Namespace Name Mixin selector official cLaxl;c:Iintermediary field_6518Lnet/minecraft/class_1367;field_6518:Inamed cooldownLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;cooldown:I
-
tryingTime
protected int tryingTime- Mappings:
Namespace Name Mixin selector official dLaxl;d:Iintermediary field_6517Lnet/minecraft/class_1367;field_6517:Inamed tryingTimeLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;tryingTime:I
-
safeWaitingTime
private int safeWaitingTime- Mappings:
Namespace Name Mixin selector official gLaxl;g:Iintermediary field_6511Lnet/minecraft/class_1367;field_6511:Inamed safeWaitingTimeLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;safeWaitingTime:I
-
targetPos
- Mappings:
Namespace Name Mixin selector official eLaxl;e:Lfx;intermediary field_6512Lnet/minecraft/class_1367;field_6512:Lnet/minecraft/class_2338;named targetPosLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;targetPos:Lnet/minecraft/util/math/BlockPos;
-
reached
private boolean reached- Mappings:
Namespace Name Mixin selector official hLaxl;h:Zintermediary field_6513Lnet/minecraft/class_1367;field_6513:Znamed reachedLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;reached:Z
-
range
private final int range- Mappings:
Namespace Name Mixin selector official iLaxl;i:Iintermediary field_6510Lnet/minecraft/class_1367;field_6510:Inamed rangeLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;range:I
-
maxYDifference
private final int maxYDifference- Mappings:
Namespace Name Mixin selector official jLaxl;j:Iintermediary field_6519Lnet/minecraft/class_1367;field_6519:Inamed maxYDifferenceLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;maxYDifference:I
-
lowestY
protected int lowestY- Mappings:
Namespace Name Mixin selector official fLaxl;f:Iintermediary field_6515Lnet/minecraft/class_1367;field_6515:Inamed lowestYLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;lowestY:I
-
-
Constructor Details
-
MoveToTargetPosGoal
- Mappings:
Namespace Name Mixin selector official <init>Laxl;<init>(Larq;DI)Vintermediary <init>Lnet/minecraft/class_1367;<init>(Lnet/minecraft/class_1314;DI)Vnamed <init>Lnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;<init>(Lnet/minecraft/entity/mob/PathAwareEntity;DI)V
-
MoveToTargetPosGoal
- Mappings:
Namespace Name Mixin selector official <init>Laxl;<init>(Larq;DII)Vintermediary <init>Lnet/minecraft/class_1367;<init>(Lnet/minecraft/class_1314;DII)Vnamed <init>Lnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;<init>(Lnet/minecraft/entity/mob/PathAwareEntity;DII)V
-
-
Method Details
-
canStart
public boolean canStart() -
getInterval
- Mappings:
Namespace Name Mixin selector official aLaxl;a(Larq;)Iintermediary method_6293Lnet/minecraft/class_1367;method_6293(Lnet/minecraft/class_1314;)Inamed getIntervalLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;getInterval(Lnet/minecraft/entity/mob/PathAwareEntity;)I
-
shouldContinue
public boolean shouldContinue()- Overrides:
shouldContinuein classGoal- Mappings:
Namespace Name Mixin selector official bLawx;b()Zintermediary method_6266Lnet/minecraft/class_1352;method_6266()Znamed shouldContinueLnet/minecraft/entity/ai/goal/Goal;shouldContinue()Z
-
start
public void start() -
startMovingToTarget
protected void startMovingToTarget()- Mappings:
Namespace Name Mixin selector official gLaxl;g()Vintermediary method_6290Lnet/minecraft/class_1367;method_6290()Vnamed startMovingToTargetLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;startMovingToTarget()V
-
getDesiredSquaredDistanceToTarget
public double getDesiredSquaredDistanceToTarget()- Mappings:
Namespace Name Mixin selector official hLaxl;h()Dintermediary method_6291Lnet/minecraft/class_1367;method_6291()Dnamed getDesiredSquaredDistanceToTargetLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;getDesiredSquaredDistanceToTarget()D
-
getTargetPos
- Mappings:
Namespace Name Mixin selector official jLaxl;j()Lfx;intermediary method_30953Lnet/minecraft/class_1367;method_30953()Lnet/minecraft/class_2338;named getTargetPosLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;getTargetPos()Lnet/minecraft/util/math/BlockPos;
-
tick
public void tick() -
shouldResetPath
public boolean shouldResetPath()- Mappings:
Namespace Name Mixin selector official kLaxl;k()Zintermediary method_6294Lnet/minecraft/class_1367;method_6294()Znamed shouldResetPathLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;shouldResetPath()Z
-
hasReached
protected boolean hasReached()- Mappings:
Namespace Name Mixin selector official lLaxl;l()Zintermediary method_6295Lnet/minecraft/class_1367;method_6295()Znamed hasReachedLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;hasReached()Z
-
findTargetPos
protected boolean findTargetPos()- Mappings:
Namespace Name Mixin selector official mLaxl;m()Zintermediary method_6292Lnet/minecraft/class_1367;method_6292()Znamed findTargetPosLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;findTargetPos()Z
-
isTargetPos
- Mappings:
Namespace Name Mixin selector official aLaxl;a(Lbty;Lfx;)Zintermediary method_6296Lnet/minecraft/class_1367;method_6296(Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;)Znamed isTargetPosLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;isTargetPos(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z
-