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 official bjcintermediary 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
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 official gLbjc;g:Iintermediary field_30221Lnet/minecraft/class_1367;field_30221: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 official hLbjc;h:Iintermediary field_30222Lnet/minecraft/class_1367;field_30222: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 official iLbjc;i:Iintermediary field_30223Lnet/minecraft/class_1367;field_30223:Inamed MIN_INTERVALLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;MIN_INTERVAL:I
-
mob
- Mappings:
Namespace Name Mixin selector official aLbjc;a:Lbcl;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 bLbjc;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 cLbjc;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 dLbjc;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 jLbjc;j:Iintermediary field_6511Lnet/minecraft/class_1367;field_6511:Inamed safeWaitingTimeLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;safeWaitingTime:I
-
targetPos
- Mappings:
Namespace Name Mixin selector official eLbjc;e:Lgt;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 kLbjc;k: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 lLbjc;l: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 mLbjc;m: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 fLbjc;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>Lbjc;<init>(Lbcl;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>Lbjc;<init>(Lbcl;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 aLbjc;a(Lbcl;)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 bLbip;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 hLbjc;h()Vintermediary method_6290Lnet/minecraft/class_1367;method_6290()Vnamed startMovingToTargetLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;startMovingToTarget()V
-
getDesiredDistanceToTarget
public double getDesiredDistanceToTarget()- Mappings:
Namespace Name Mixin selector official iLbjc;i()Dintermediary method_6291Lnet/minecraft/class_1367;method_6291()Dnamed getDesiredDistanceToTargetLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;getDesiredDistanceToTarget()D
-
getTargetPos
- Mappings:
Namespace Name Mixin selector official kLbjc;k()Lgt;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;
-
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 official E_Lbip;E_()Zintermediary method_38846Lnet/minecraft/class_1352;method_38846()Znamed shouldRunEveryTickLnet/minecraft/entity/ai/goal/Goal;shouldRunEveryTick()Z
-
tick
public void tick() -
shouldResetPath
public boolean shouldResetPath()- Mappings:
Namespace Name Mixin selector official lLbjc;l()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 mLbjc;m()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 nLbjc;n()Zintermediary method_6292Lnet/minecraft/class_1367;method_6292()Znamed findTargetPosLnet/minecraft/entity/ai/goal/MoveToTargetPosGoal;findTargetPos()Z
-
isTargetPos
- Mappings:
Namespace Name Mixin selector official aLbjc;a(Lcha;Lgt;)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
-