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 named net/minecraft/entity/ai/goal/MoveToTargetPosGoalintermediary net/minecraft/class_1367official caz
-
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 named MIN_WAITING_TIMELnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;MIN_WAITING_TIME:Iintermediary field_30221Lnet/minecraft/class_1367;field_30221:Iofficial gLcaz;g:I
-
MAX_TRYING_TIME
private static final int MAX_TRYING_TIME- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_TRYING_TIMELnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;MAX_TRYING_TIME:Iintermediary field_30222Lnet/minecraft/class_1367;field_30222:Iofficial hLcaz;h:I
-
MIN_INTERVAL
private static final int MIN_INTERVAL- See Also:
- Mappings:
Namespace Name Mixin selector named MIN_INTERVALLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;MIN_INTERVAL:Iintermediary field_30223Lnet/minecraft/class_1367;field_30223:Iofficial iLcaz;i:I
-
mob
- Mappings:
Namespace Name Mixin selector named mobLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;mob:Lnet/minecraft/entity/mob/PathAwareEntity;intermediary field_6516Lnet/minecraft/class_1367;field_6516:Lnet/minecraft/class_1314;official aLcaz;a:Lbtw;
-
speed
public final double speed- Mappings:
Namespace Name Mixin selector named speedLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;speed:Dintermediary field_6514Lnet/minecraft/class_1367;field_6514:Dofficial bLcaz;b:D
-
cooldown
protected int cooldown- Mappings:
Namespace Name Mixin selector named cooldownLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;cooldown:Iintermediary field_6518Lnet/minecraft/class_1367;field_6518:Iofficial cLcaz;c:I
-
tryingTime
protected int tryingTime- Mappings:
Namespace Name Mixin selector named tryingTimeLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;tryingTime:Iintermediary field_6517Lnet/minecraft/class_1367;field_6517:Iofficial dLcaz;d:I
-
safeWaitingTime
private int safeWaitingTime- Mappings:
Namespace Name Mixin selector named safeWaitingTimeLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;safeWaitingTime:Iintermediary field_6511Lnet/minecraft/class_1367;field_6511:Iofficial jLcaz;j:I
-
targetPos
- Mappings:
Namespace Name Mixin selector named targetPosLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;targetPos:Lnet/minecraft/util/math/BlockPos;intermediary field_6512Lnet/minecraft/class_1367;field_6512:Lnet/minecraft/class_2338;official eLcaz;e:Ljd;
-
reached
private boolean reached- Mappings:
Namespace Name Mixin selector named reachedLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;reached:Zintermediary field_6513Lnet/minecraft/class_1367;field_6513:Zofficial kLcaz;k:Z
-
range
private final int range- Mappings:
Namespace Name Mixin selector named rangeLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;range:Iintermediary field_6510Lnet/minecraft/class_1367;field_6510:Iofficial lLcaz;l:I
-
maxYDifference
private final int maxYDifference- Mappings:
Namespace Name Mixin selector named maxYDifferenceLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;maxYDifference:Iintermediary field_6519Lnet/minecraft/class_1367;field_6519:Iofficial mLcaz;m:I
-
lowestY
protected int lowestY- Mappings:
Namespace Name Mixin selector named lowestYLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;lowestY:Iintermediary field_6515Lnet/minecraft/class_1367;field_6515:Iofficial fLcaz;f:I
-
-
Constructor Details
-
MoveToTargetPosGoal
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;<init>(Lnet/minecraft/entity/mob/PathAwareEntity;DI)Vintermediary <init>Lnet/minecraft/class_1367;<init>(Lnet/minecraft/class_1314;DI)Vofficial <init>Lcaz;<init>(Lbtw;DI)V
-
MoveToTargetPosGoal
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;<init>(Lnet/minecraft/entity/mob/PathAwareEntity;DII)Vintermediary <init>Lnet/minecraft/class_1367;<init>(Lnet/minecraft/class_1314;DII)Vofficial <init>Lcaz;<init>(Lbtw;DII)V
-
-
Method Details
-
canStart
public boolean canStart() -
getInterval
- Mappings:
Namespace Name Mixin selector named getIntervalLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;getInterval(Lnet/minecraft/entity/mob/PathAwareEntity;)Iintermediary method_6293Lnet/minecraft/class_1367;method_6293(Lnet/minecraft/class_1314;)Iofficial aLcaz;a(Lbtw;)I
-
shouldContinue
public boolean shouldContinue()- Overrides:
shouldContinuein classGoal- Mappings:
Namespace Name Mixin selector named shouldContinueLnet/minecraft/entity/ai/goal/Goal;shouldContinue()Zintermediary method_6266Lnet/minecraft/class_1352;method_6266()Zofficial cLcam;c()Z
-
start
public void start() -
startMovingToTarget
protected void startMovingToTarget()- Mappings:
Namespace Name Mixin selector named startMovingToTargetLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;startMovingToTarget()Vintermediary method_6290Lnet/minecraft/class_1367;method_6290()Vofficial hLcaz;h()V
-
getDesiredDistanceToTarget
public double getDesiredDistanceToTarget()- Mappings:
Namespace Name Mixin selector named getDesiredDistanceToTargetLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;getDesiredDistanceToTarget()Dintermediary method_6291Lnet/minecraft/class_1367;method_6291()Dofficial iLcaz;i()D
-
getTargetPos
- Mappings:
Namespace Name Mixin selector named getTargetPosLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;getTargetPos()Lnet/minecraft/util/math/BlockPos;intermediary method_30953Lnet/minecraft/class_1367;method_30953()Lnet/minecraft/class_2338;official kLcaz;k()Ljd;
-
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 named shouldRunEveryTickLnet/minecraft/entity/ai/goal/Goal;shouldRunEveryTick()Zintermediary method_38846Lnet/minecraft/class_1352;method_38846()Zofficial V_Lcam;V_()Z
-
tick
public void tick() -
shouldResetPath
public boolean shouldResetPath()- Mappings:
Namespace Name Mixin selector named shouldResetPathLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;shouldResetPath()Zintermediary method_6294Lnet/minecraft/class_1367;method_6294()Zofficial lLcaz;l()Z
-
hasReached
protected boolean hasReached()- Mappings:
Namespace Name Mixin selector named hasReachedLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;hasReached()Zintermediary method_6295Lnet/minecraft/class_1367;method_6295()Zofficial mLcaz;m()Z
-
findTargetPos
protected boolean findTargetPos()- Mappings:
Namespace Name Mixin selector named findTargetPosLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;findTargetPos()Zintermediary method_6292Lnet/minecraft/class_1367;method_6292()Zofficial nLcaz;n()Z
-
isTargetPos
- Mappings:
Namespace Name Mixin selector named isTargetPosLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;isTargetPos(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;)Zintermediary method_6296Lnet/minecraft/class_1367;method_6296(Lnet/minecraft/class_4538;Lnet/minecraft/class_2338;)Zofficial aLcaz;a(Ldcz;Ljd;)Z
-