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.EatBerriesGoal,GoToBedAndSleepGoal,RabbitEntity.EatCarrotCropGoal,StepAndDestroyBlockGoal,StriderEntity.GoBackToLavaGoal,TurtleEntity.LayEggGoal,TurtleEntity.WanderInWaterGoal
- Mappings:
Namespace Name intermediary net/minecraft/class_1367official bngnamed 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
FieldsModifier and TypeFieldDescriptionprotected intprotected intprivate static final intprivate final intprivate static final intprivate static final intprotected final PathAwareEntityprivate final intprivate booleanprivate intfinal doubleprotected BlockPosprotected int -
Constructor Summary
ConstructorsConstructorDescriptionMoveToTargetPosGoal(PathAwareEntity mob, double speed, int range) MoveToTargetPosGoal(PathAwareEntity mob, double speed, int range, int maxYDifference) -
Method Summary
Modifier and TypeMethodDescriptionbooleancanStart()protected booleandoubleprotected intprotected BlockPosprotected booleanprotected abstract booleanisTargetPos(WorldView world, BlockPos pos) booleanbooleanbooleanReturns if the goal should run every tick or not.voidstart()protected voidvoidtick()Methods inherited from class net.minecraft.entity.ai.goal.Goal
canStop, getControls, getTickCount, setControls, stop, toGoalTicks, toString
-
Field Details
-
MIN_WAITING_TIME
private static final int MIN_WAITING_TIME- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_30221Lnet/minecraft/class_1367;field_30221:Iofficial gLbng;g:Inamed MIN_WAITING_TIMELnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;MIN_WAITING_TIME:I
-
MAX_TRYING_TIME
private static final int MAX_TRYING_TIME- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_30222Lnet/minecraft/class_1367;field_30222:Iofficial hLbng;h:Inamed MAX_TRYING_TIMELnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;MAX_TRYING_TIME:I
-
MIN_INTERVAL
private static final int MIN_INTERVAL- See Also:
- Mappings:
Namespace Name Mixin selector intermediary field_30223Lnet/minecraft/class_1367;field_30223:Iofficial iLbng;i:Inamed MIN_INTERVALLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;MIN_INTERVAL:I
-
mob
- Mappings:
Namespace Name Mixin selector intermediary field_6516Lnet/minecraft/class_1367;field_6516:Lnet/minecraft/class_1314;official aLbng;a:Lbgg;named mobLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;mob:Lnet/minecraft/entity/mob/PathAwareEntity;
-
speed
public final double speed- Mappings:
Namespace Name Mixin selector intermediary field_6514Lnet/minecraft/class_1367;field_6514:Dofficial bLbng;b:Dnamed speedLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;speed:D
-
cooldown
protected int cooldown- Mappings:
Namespace Name Mixin selector intermediary field_6518Lnet/minecraft/class_1367;field_6518:Iofficial cLbng;c:Inamed cooldownLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;cooldown:I
-
tryingTime
protected int tryingTime- Mappings:
Namespace Name Mixin selector intermediary field_6517Lnet/minecraft/class_1367;field_6517:Iofficial dLbng;d:Inamed tryingTimeLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;tryingTime:I
-
safeWaitingTime
private int safeWaitingTime- Mappings:
Namespace Name Mixin selector intermediary field_6511Lnet/minecraft/class_1367;field_6511:Iofficial jLbng;j:Inamed safeWaitingTimeLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;safeWaitingTime:I
-
targetPos
- Mappings:
Namespace Name Mixin selector intermediary field_6512Lnet/minecraft/class_1367;field_6512:Lnet/minecraft/class_2338;official eLbng;e:Lgu;named targetPosLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;targetPos:Lnet/minecraft/util/math/BlockPos;
-
reached
private boolean reached- Mappings:
Namespace Name Mixin selector intermediary field_6513Lnet/minecraft/class_1367;field_6513:Zofficial kLbng;k:Znamed reachedLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;reached:Z
-
range
private final int range- Mappings:
Namespace Name Mixin selector intermediary field_6510Lnet/minecraft/class_1367;field_6510:Iofficial lLbng;l:Inamed rangeLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;range:I
-
maxYDifference
private final int maxYDifference- Mappings:
Namespace Name Mixin selector intermediary field_6519Lnet/minecraft/class_1367;field_6519:Iofficial mLbng;m:Inamed maxYDifferenceLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;maxYDifference:I
-
lowestY
protected int lowestY- Mappings:
Namespace Name Mixin selector intermediary field_6515Lnet/minecraft/class_1367;field_6515:Iofficial fLbng;f:Inamed lowestYLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;lowestY:I
-
-
Constructor Details
-
MoveToTargetPosGoal
- Mappings:
Namespace Name Mixin selector intermediary <init>Lnet/minecraft/class_1367;<init>(Lnet/minecraft/class_1314;DI)Vofficial <init>Lbng;<init>(Lbgg;DI)Vnamed <init>Lnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;<init>(Lnet/minecraft/entity/mob/PathAwareEntity;DI)V
-
MoveToTargetPosGoal
- Mappings:
Namespace Name Mixin selector intermediary <init>Lnet/minecraft/class_1367;<init>(Lnet/minecraft/class_1314;DII)Vofficial <init>Lbng;<init>(Lbgg;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 intermediary method_6293Lnet/minecraft/class_1367;method_6293(Lnet/minecraft/class_1314;)Iofficial aLbng;a(Lbgg;)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 intermediary method_6266Lnet/minecraft/class_1352;method_6266()Zofficial bLbmt;b()Znamed shouldContinueLnet/minecraft/entity/ai/goal/Goal;shouldContinue()Z
-
start
public void start() -
startMovingToTarget
protected void startMovingToTarget()- Mappings:
Namespace Name Mixin selector intermediary method_6290Lnet/minecraft/class_1367;method_6290()Vofficial hLbng;h()Vnamed startMovingToTargetLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;startMovingToTarget()V
-
getDesiredDistanceToTarget
public double getDesiredDistanceToTarget()- Mappings:
Namespace Name Mixin selector intermediary method_6291Lnet/minecraft/class_1367;method_6291()Dofficial iLbng;i()Dnamed getDesiredDistanceToTargetLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;getDesiredDistanceToTarget()D
-
getTargetPos
- Mappings:
Namespace Name Mixin selector intermediary method_30953Lnet/minecraft/class_1367;method_30953()Lnet/minecraft/class_2338;official kLbng;k()Lgu;named getTargetPosLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;getTargetPos()Lnet/minecraft/util/math/BlockPos;
-
shouldRunEveryTick
public boolean shouldRunEveryTick()Returns if the goal should run every tick or not.This returns
falseby default. If this returns false, the goal will tick once after the entity is spawned, and will tick every other tick.- Overrides:
shouldRunEveryTickin classGoal- Returns:
- if the goal should run every tick or not
- See Also:
- Mappings:
Namespace Name Mixin selector intermediary method_38846Lnet/minecraft/class_1352;method_38846()Zofficial J_Lbmt;J_()Znamed shouldRunEveryTickLnet/minecraft/entity/ai/goal/Goal;shouldRunEveryTick()Z
-
tick
public void tick() -
shouldResetPath
public boolean shouldResetPath()- Mappings:
Namespace Name Mixin selector intermediary method_6294Lnet/minecraft/class_1367;method_6294()Zofficial lLbng;l()Znamed shouldResetPathLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;shouldResetPath()Z
-
hasReached
protected boolean hasReached()- Mappings:
Namespace Name Mixin selector intermediary method_6295Lnet/minecraft/class_1367;method_6295()Zofficial mLbng;m()Znamed hasReachedLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;hasReached()Z
-
findTargetPos
protected boolean findTargetPos()- Mappings:
Namespace Name Mixin selector intermediary method_6292Lnet/minecraft/class_1367;method_6292()Zofficial nLbng;n()Znamed findTargetPosLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;findTargetPos()Z
-
isTargetPos
- Mappings:
Namespace Name Mixin selector intermediary method_6296Lnet/minecraft/class_1367;method_6296(Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;)Zofficial aLbng;a(Lcmn;Lgu;)Znamed isTargetPosLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;isTargetPos(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Z
-