Package net.minecraft.entity.ai.pathing
Class EntityNavigation
java.lang.Object
net.minecraft.entity.ai.pathing.EntityNavigation
- Direct Known Subclasses:
BirdNavigation
,MobNavigation
,SwimNavigation
public abstract class EntityNavigation extends Object
- Mappings:
Namespace Name official azl
intermediary net/minecraft/class_1408
named net/minecraft/entity/ai/pathing/EntityNavigation
-
Field Summary
Fields Modifier and Type Field Description private int
currentDistance
protected long
currentNodeMs
protected double
currentNodeTimeout
protected Path
currentPath
private BlockPos
currentTarget
protected MobEntity
entity
protected long
lastActiveTickMs
protected Vec3i
lastNodePosition
protected long
lastRecalculateTime
private boolean
nearPathStartPos
protected PathNodeMaker
nodeMaker
protected float
nodeReachProximity
If the Chebyshev distance from the entity to the next node is less than or equal to this value, the entity is considered "reached" the node.private PathNodeNavigator
pathNodeNavigator
protected Vec3d
pathStartPos
protected int
pathStartTime
private float
rangeMultiplier
protected boolean
shouldRecalculate
protected double
speed
protected int
tickCount
protected World
world
-
Constructor Summary
Constructors Constructor Description EntityNavigation(MobEntity mob, World world)
-
Method Summary
Modifier and Type Method Description protected void
adjustPath()
Adjusts the current path according to various special obstacles that may be in the way, for example sunlightprotected abstract boolean
canPathDirectlyThrough(Vec3d origin, Vec3d target, int sizeX, int sizeY, int sizeZ)
boolean
canSwim()
protected void
checkTimeouts(Vec3d currentPos)
protected void
continueFollowingPath()
protected abstract PathNodeNavigator
createPathNodeNavigator(int range)
Path
findPathTo(double x, double y, double z, int distance)
Path
findPathTo(Entity entity, int distance)
Path
findPathTo(BlockPos target, int distance)
protected Path
findPathToAny(Set<BlockPos> positions, int range, boolean bool, int distance)
Path
findPathToAny(Stream<BlockPos> positions, int distance)
Path
getCurrentPath()
PathNodeMaker
getNodeMaker()
protected abstract Vec3d
getPos()
The position to act as if the entity is at for pathfinding purposesBlockPos
getTargetPos()
protected abstract boolean
isAtValidPosition()
boolean
isFollowingPath()
boolean
isIdle()
protected boolean
isInLiquid()
boolean
isNearPathStartPos()
boolean
isValidPosition(BlockPos pos)
private boolean
method_27799(Vec3d vec3d)
Path
method_29934(Set<BlockPos> set, int int2)
void
onBlockChanged(BlockPos pos)
void
recalculatePath()
private void
resetNode()
private void
resetNodeAndStop()
void
resetRangeMultiplier()
void
setCanSwim(boolean canSwim)
void
setRangeMultiplier(float rangeMultiplier)
void
setSpeed(double speed)
boolean
shouldRecalculatePath()
boolean
startMovingAlong(Path path, double speed)
boolean
startMovingTo(double x, double y, double z, double speed)
boolean
startMovingTo(Entity entity, double speed)
void
stop()
void
tick()
-
Field Details
-
entity
- Mappings:
Namespace Name Mixin selector official a
Lazl;a:Larj;
intermediary field_6684
Lnet/minecraft/class_1408;field_6684:Lnet/minecraft/class_1308;
named entity
Lnet/minecraft/entity/ai/pathing/EntityNavigation;entity:Lnet/minecraft/entity/mob/MobEntity;
-
world
- Mappings:
Namespace Name Mixin selector official b
Lazl;b:Lbtv;
intermediary field_6677
Lnet/minecraft/class_1408;field_6677:Lnet/minecraft/class_1937;
named world
Lnet/minecraft/entity/ai/pathing/EntityNavigation;world:Lnet/minecraft/world/World;
-
currentPath
- Mappings:
Namespace Name Mixin selector official c
Lazl;c:Ldct;
intermediary field_6681
Lnet/minecraft/class_1408;field_6681:Lnet/minecraft/class_11;
named currentPath
Lnet/minecraft/entity/ai/pathing/EntityNavigation;currentPath:Lnet/minecraft/entity/ai/pathing/Path;
-
speed
protected double speed- Mappings:
Namespace Name Mixin selector official d
Lazl;d:D
intermediary field_6668
Lnet/minecraft/class_1408;field_6668:D
named speed
Lnet/minecraft/entity/ai/pathing/EntityNavigation;speed:D
-
tickCount
protected int tickCount- Mappings:
Namespace Name Mixin selector official e
Lazl;e:I
intermediary field_6675
Lnet/minecraft/class_1408;field_6675:I
named tickCount
Lnet/minecraft/entity/ai/pathing/EntityNavigation;tickCount:I
-
pathStartTime
protected int pathStartTime- Mappings:
Namespace Name Mixin selector official f
Lazl;f:I
intermediary field_6674
Lnet/minecraft/class_1408;field_6674:I
named pathStartTime
Lnet/minecraft/entity/ai/pathing/EntityNavigation;pathStartTime:I
-
pathStartPos
- Mappings:
Namespace Name Mixin selector official g
Lazl;g:Ldiu;
intermediary field_6672
Lnet/minecraft/class_1408;field_6672:Lnet/minecraft/class_243;
named pathStartPos
Lnet/minecraft/entity/ai/pathing/EntityNavigation;pathStartPos:Lnet/minecraft/util/math/Vec3d;
-
lastNodePosition
- Mappings:
Namespace Name Mixin selector official h
Lazl;h:Lgs;
intermediary field_6680
Lnet/minecraft/class_1408;field_6680:Lnet/minecraft/class_2382;
named lastNodePosition
Lnet/minecraft/entity/ai/pathing/EntityNavigation;lastNodePosition:Lnet/minecraft/util/math/Vec3i;
-
currentNodeMs
protected long currentNodeMs- Mappings:
Namespace Name Mixin selector official i
Lazl;i:J
intermediary field_6670
Lnet/minecraft/class_1408;field_6670:J
named currentNodeMs
Lnet/minecraft/entity/ai/pathing/EntityNavigation;currentNodeMs:J
-
lastActiveTickMs
protected long lastActiveTickMs- Mappings:
Namespace Name Mixin selector official j
Lazl;j:J
intermediary field_6669
Lnet/minecraft/class_1408;field_6669:J
named lastActiveTickMs
Lnet/minecraft/entity/ai/pathing/EntityNavigation;lastActiveTickMs:J
-
currentNodeTimeout
protected double currentNodeTimeout- Mappings:
Namespace Name Mixin selector official k
Lazl;k:D
intermediary field_6682
Lnet/minecraft/class_1408;field_6682:D
named currentNodeTimeout
Lnet/minecraft/entity/ai/pathing/EntityNavigation;currentNodeTimeout:D
-
nodeReachProximity
protected float nodeReachProximityIf the Chebyshev distance from the entity to the next node is less than or equal to this value, the entity is considered "reached" the node.- Mappings:
Namespace Name Mixin selector official l
Lazl;l:F
intermediary field_6683
Lnet/minecraft/class_1408;field_6683:F
named nodeReachProximity
Lnet/minecraft/entity/ai/pathing/EntityNavigation;nodeReachProximity:F
-
shouldRecalculate
protected boolean shouldRecalculate- Mappings:
Namespace Name Mixin selector official m
Lazl;m:Z
intermediary field_6679
Lnet/minecraft/class_1408;field_6679:Z
named shouldRecalculate
Lnet/minecraft/entity/ai/pathing/EntityNavigation;shouldRecalculate:Z
-
lastRecalculateTime
protected long lastRecalculateTime- Mappings:
Namespace Name Mixin selector official n
Lazl;n:J
intermediary field_6685
Lnet/minecraft/class_1408;field_6685:J
named lastRecalculateTime
Lnet/minecraft/entity/ai/pathing/EntityNavigation;lastRecalculateTime:J
-
nodeMaker
- Mappings:
Namespace Name Mixin selector official o
Lazl;o:Ldcs;
intermediary field_6678
Lnet/minecraft/class_1408;field_6678:Lnet/minecraft/class_8;
named nodeMaker
Lnet/minecraft/entity/ai/pathing/EntityNavigation;nodeMaker:Lnet/minecraft/entity/ai/pathing/PathNodeMaker;
-
currentTarget
- Mappings:
Namespace Name Mixin selector official p
Lazl;p:Lfx;
intermediary field_20293
Lnet/minecraft/class_1408;field_20293:Lnet/minecraft/class_2338;
named currentTarget
Lnet/minecraft/entity/ai/pathing/EntityNavigation;currentTarget:Lnet/minecraft/util/math/BlockPos;
-
currentDistance
private int currentDistance- Mappings:
Namespace Name Mixin selector official q
Lazl;q:I
intermediary field_20294
Lnet/minecraft/class_1408;field_20294:I
named currentDistance
Lnet/minecraft/entity/ai/pathing/EntityNavigation;currentDistance:I
-
rangeMultiplier
private float rangeMultiplier- Mappings:
Namespace Name Mixin selector official r
Lazl;r:F
intermediary field_21642
Lnet/minecraft/class_1408;field_21642:F
named rangeMultiplier
Lnet/minecraft/entity/ai/pathing/EntityNavigation;rangeMultiplier:F
-
nearPathStartPos
private boolean nearPathStartPos- Mappings:
Namespace Name Mixin selector official t
Lazl;t:Z
intermediary field_26820
Lnet/minecraft/class_1408;field_26820:Z
named nearPathStartPos
Lnet/minecraft/entity/ai/pathing/EntityNavigation;nearPathStartPos:Z
-
-
Constructor Details
-
EntityNavigation
- Mappings:
Namespace Name Mixin selector official <init>
Lazl;<init>(Larj;Lbtv;)V
intermediary <init>
Lnet/minecraft/class_1408;<init>(Lnet/minecraft/class_1308;Lnet/minecraft/class_1937;)V
named <init>
Lnet/minecraft/entity/ai/pathing/EntityNavigation;<init>(Lnet/minecraft/entity/mob/MobEntity;Lnet/minecraft/world/World;)V
-
-
Method Details
-
resetRangeMultiplier
public void resetRangeMultiplier()- Mappings:
Namespace Name Mixin selector official g
Lazl;g()V
intermediary method_23965
Lnet/minecraft/class_1408;method_23965()V
named resetRangeMultiplier
Lnet/minecraft/entity/ai/pathing/EntityNavigation;resetRangeMultiplier()V
-
setRangeMultiplier
public void setRangeMultiplier(float rangeMultiplier)- Mappings:
Namespace Name Mixin selector official a
Lazl;a(F)V
intermediary method_23964
Lnet/minecraft/class_1408;method_23964(F)V
named setRangeMultiplier
Lnet/minecraft/entity/ai/pathing/EntityNavigation;setRangeMultiplier(F)V
-
getTargetPos
- Mappings:
Namespace Name Mixin selector official h
Lazl;h()Lfx;
intermediary method_6355
Lnet/minecraft/class_1408;method_6355()Lnet/minecraft/class_2338;
named getTargetPos
Lnet/minecraft/entity/ai/pathing/EntityNavigation;getTargetPos()Lnet/minecraft/util/math/BlockPos;
-
setSpeed
public void setSpeed(double speed)- Mappings:
Namespace Name Mixin selector official a
Lazl;a(D)V
intermediary method_6344
Lnet/minecraft/class_1408;method_6344(D)V
named setSpeed
Lnet/minecraft/entity/ai/pathing/EntityNavigation;setSpeed(D)V
-
shouldRecalculatePath
public boolean shouldRecalculatePath()- Mappings:
Namespace Name Mixin selector official i
Lazl;i()Z
intermediary method_6343
Lnet/minecraft/class_1408;method_6343()Z
named shouldRecalculatePath
Lnet/minecraft/entity/ai/pathing/EntityNavigation;shouldRecalculatePath()Z
-
recalculatePath
public void recalculatePath()- Mappings:
Namespace Name Mixin selector official j
Lazl;j()V
intermediary method_6356
Lnet/minecraft/class_1408;method_6356()V
named recalculatePath
Lnet/minecraft/entity/ai/pathing/EntityNavigation;recalculatePath()V
-
findPathTo
- Mappings:
Namespace Name Mixin selector official a
Lazl;a(DDDI)Ldct;
intermediary method_6352
Lnet/minecraft/class_1408;method_6352(DDDI)Lnet/minecraft/class_11;
named findPathTo
Lnet/minecraft/entity/ai/pathing/EntityNavigation;findPathTo(DDDI)Lnet/minecraft/entity/ai/pathing/Path;
-
findPathToAny
- Mappings:
Namespace Name Mixin selector official a
Lazl;a(Ljava/util/stream/Stream;I)Ldct;
intermediary method_21643
Lnet/minecraft/class_1408;method_21643(Ljava/util/stream/Stream;I)Lnet/minecraft/class_11;
named findPathToAny
Lnet/minecraft/entity/ai/pathing/EntityNavigation;findPathToAny(Ljava/util/stream/Stream;I)Lnet/minecraft/entity/ai/pathing/Path;
-
method_29934
- Mappings:
Namespace Name Mixin selector official a
Lazl;a(Ljava/util/Set;I)Ldct;
intermediary method_29934
Lnet/minecraft/class_1408;method_29934(Ljava/util/Set;I)Lnet/minecraft/class_11;
named method_29934
Lnet/minecraft/entity/ai/pathing/EntityNavigation;method_29934(Ljava/util/Set;I)Lnet/minecraft/entity/ai/pathing/Path;
-
findPathTo
- Mappings:
Namespace Name Mixin selector official a
Lazl;a(Lfx;I)Ldct;
intermediary method_6348
Lnet/minecraft/class_1408;method_6348(Lnet/minecraft/class_2338;I)Lnet/minecraft/class_11;
named findPathTo
Lnet/minecraft/entity/ai/pathing/EntityNavigation;findPathTo(Lnet/minecraft/util/math/BlockPos;I)Lnet/minecraft/entity/ai/pathing/Path;
-
findPathTo
- Mappings:
Namespace Name Mixin selector official a
Lazl;a(Laqv;I)Ldct;
intermediary method_6349
Lnet/minecraft/class_1408;method_6349(Lnet/minecraft/class_1297;I)Lnet/minecraft/class_11;
named findPathTo
Lnet/minecraft/entity/ai/pathing/EntityNavigation;findPathTo(Lnet/minecraft/entity/Entity;I)Lnet/minecraft/entity/ai/pathing/Path;
-
findPathToAny
@Nullable protected Path findPathToAny(Set<BlockPos> positions, int range, boolean bool, int distance)- Mappings:
Namespace Name Mixin selector official a
Lazl;a(Ljava/util/Set;IZI)Ldct;
intermediary method_18416
Lnet/minecraft/class_1408;method_18416(Ljava/util/Set;IZI)Lnet/minecraft/class_11;
named findPathToAny
Lnet/minecraft/entity/ai/pathing/EntityNavigation;findPathToAny(Ljava/util/Set;IZI)Lnet/minecraft/entity/ai/pathing/Path;
-
startMovingTo
public boolean startMovingTo(double x, double y, double z, double speed)- Mappings:
Namespace Name Mixin selector official a
Lazl;a(DDDD)Z
intermediary method_6337
Lnet/minecraft/class_1408;method_6337(DDDD)Z
named startMovingTo
Lnet/minecraft/entity/ai/pathing/EntityNavigation;startMovingTo(DDDD)Z
-
startMovingTo
- Mappings:
Namespace Name Mixin selector official a
Lazl;a(Laqv;D)Z
intermediary method_6335
Lnet/minecraft/class_1408;method_6335(Lnet/minecraft/class_1297;D)Z
named startMovingTo
Lnet/minecraft/entity/ai/pathing/EntityNavigation;startMovingTo(Lnet/minecraft/entity/Entity;D)Z
-
startMovingAlong
- Mappings:
Namespace Name Mixin selector official a
Lazl;a(Ldct;D)Z
intermediary method_6334
Lnet/minecraft/class_1408;method_6334(Lnet/minecraft/class_11;D)Z
named startMovingAlong
Lnet/minecraft/entity/ai/pathing/EntityNavigation;startMovingAlong(Lnet/minecraft/entity/ai/pathing/Path;D)Z
-
getCurrentPath
- Mappings:
Namespace Name Mixin selector official k
Lazl;k()Ldct;
intermediary method_6345
Lnet/minecraft/class_1408;method_6345()Lnet/minecraft/class_11;
named getCurrentPath
Lnet/minecraft/entity/ai/pathing/EntityNavigation;getCurrentPath()Lnet/minecraft/entity/ai/pathing/Path;
-
tick
public void tick()- Mappings:
Namespace Name Mixin selector official c
Lazl;c()V
intermediary method_6360
Lnet/minecraft/class_1408;method_6360()V
named tick
Lnet/minecraft/entity/ai/pathing/EntityNavigation;tick()V
-
continueFollowingPath
protected void continueFollowingPath()- Mappings:
Namespace Name Mixin selector official l
Lazl;l()V
intermediary method_6339
Lnet/minecraft/class_1408;method_6339()V
named continueFollowingPath
Lnet/minecraft/entity/ai/pathing/EntityNavigation;continueFollowingPath()V
-
method_27799
- Mappings:
Namespace Name Mixin selector official b
Lazl;b(Ldiu;)Z
intermediary method_27799
Lnet/minecraft/class_1408;method_27799(Lnet/minecraft/class_243;)Z
named method_27799
Lnet/minecraft/entity/ai/pathing/EntityNavigation;method_27799(Lnet/minecraft/util/math/Vec3d;)Z
-
checkTimeouts
- Mappings:
Namespace Name Mixin selector official a
Lazl;a(Ldiu;)V
intermediary method_6346
Lnet/minecraft/class_1408;method_6346(Lnet/minecraft/class_243;)V
named checkTimeouts
Lnet/minecraft/entity/ai/pathing/EntityNavigation;checkTimeouts(Lnet/minecraft/util/math/Vec3d;)V
-
resetNodeAndStop
private void resetNodeAndStop()- Mappings:
Namespace Name Mixin selector official e
Lazl;e()V
intermediary method_31266
Lnet/minecraft/class_1408;method_31266()V
named resetNodeAndStop
Lnet/minecraft/entity/ai/pathing/EntityNavigation;resetNodeAndStop()V
-
resetNode
private void resetNode()- Mappings:
Namespace Name Mixin selector official f
Lazl;f()V
intermediary method_26085
Lnet/minecraft/class_1408;method_26085()V
named resetNode
Lnet/minecraft/entity/ai/pathing/EntityNavigation;resetNode()V
-
isIdle
public boolean isIdle()- Mappings:
Namespace Name Mixin selector official m
Lazl;m()Z
intermediary method_6357
Lnet/minecraft/class_1408;method_6357()Z
named isIdle
Lnet/minecraft/entity/ai/pathing/EntityNavigation;isIdle()Z
-
isFollowingPath
public boolean isFollowingPath()- Mappings:
Namespace Name Mixin selector official n
Lazl;n()Z
intermediary method_23966
Lnet/minecraft/class_1408;method_23966()Z
named isFollowingPath
Lnet/minecraft/entity/ai/pathing/EntityNavigation;isFollowingPath()Z
-
stop
public void stop()- Mappings:
Namespace Name Mixin selector official o
Lazl;o()V
intermediary method_6340
Lnet/minecraft/class_1408;method_6340()V
named stop
Lnet/minecraft/entity/ai/pathing/EntityNavigation;stop()V
-
getPos
The position to act as if the entity is at for pathfinding purposes- Mappings:
Namespace Name Mixin selector official b
Lazl;b()Ldiu;
intermediary method_6347
Lnet/minecraft/class_1408;method_6347()Lnet/minecraft/class_243;
named getPos
Lnet/minecraft/entity/ai/pathing/EntityNavigation;getPos()Lnet/minecraft/util/math/Vec3d;
-
isAtValidPosition
protected abstract boolean isAtValidPosition()- Mappings:
Namespace Name Mixin selector official a
Lazl;a()Z
intermediary method_6358
Lnet/minecraft/class_1408;method_6358()Z
named isAtValidPosition
Lnet/minecraft/entity/ai/pathing/EntityNavigation;isAtValidPosition()Z
-
isInLiquid
protected boolean isInLiquid()- Mappings:
Namespace Name Mixin selector official p
Lazl;p()Z
intermediary method_6351
Lnet/minecraft/class_1408;method_6351()Z
named isInLiquid
Lnet/minecraft/entity/ai/pathing/EntityNavigation;isInLiquid()Z
-
adjustPath
protected void adjustPath()Adjusts the current path according to various special obstacles that may be in the way, for example sunlight- Mappings:
Namespace Name Mixin selector official F_
Lazl;F_()V
intermediary method_6359
Lnet/minecraft/class_1408;method_6359()V
named adjustPath
Lnet/minecraft/entity/ai/pathing/EntityNavigation;adjustPath()V
-
canPathDirectlyThrough
protected abstract boolean canPathDirectlyThrough(Vec3d origin, Vec3d target, int sizeX, int sizeY, int sizeZ)- Mappings:
Namespace Name Mixin selector official a
Lazl;a(Ldiu;Ldiu;III)Z
intermediary method_6341
Lnet/minecraft/class_1408;method_6341(Lnet/minecraft/class_243;Lnet/minecraft/class_243;III)Z
named canPathDirectlyThrough
Lnet/minecraft/entity/ai/pathing/EntityNavigation;canPathDirectlyThrough(Lnet/minecraft/util/math/Vec3d;Lnet/minecraft/util/math/Vec3d;III)Z
-
isValidPosition
- Mappings:
Namespace Name Mixin selector official a
Lazl;a(Lfx;)Z
intermediary method_6333
Lnet/minecraft/class_1408;method_6333(Lnet/minecraft/class_2338;)Z
named isValidPosition
Lnet/minecraft/entity/ai/pathing/EntityNavigation;isValidPosition(Lnet/minecraft/util/math/BlockPos;)Z
-
getNodeMaker
- Mappings:
Namespace Name Mixin selector official q
Lazl;q()Ldcs;
intermediary method_6342
Lnet/minecraft/class_1408;method_6342()Lnet/minecraft/class_8;
named getNodeMaker
Lnet/minecraft/entity/ai/pathing/EntityNavigation;getNodeMaker()Lnet/minecraft/entity/ai/pathing/PathNodeMaker;
-
setCanSwim
public void setCanSwim(boolean canSwim)- Mappings:
Namespace Name Mixin selector official d
Lazl;d(Z)V
intermediary method_6354
Lnet/minecraft/class_1408;method_6354(Z)V
named setCanSwim
Lnet/minecraft/entity/ai/pathing/EntityNavigation;setCanSwim(Z)V
-
canSwim
public boolean canSwim()- Mappings:
Namespace Name Mixin selector official r
Lazl;r()Z
intermediary method_6350
Lnet/minecraft/class_1408;method_6350()Z
named canSwim
Lnet/minecraft/entity/ai/pathing/EntityNavigation;canSwim()Z
-
onBlockChanged
- Mappings:
Namespace Name Mixin selector official b
Lazl;b(Lfx;)V
intermediary method_18053
Lnet/minecraft/class_1408;method_18053(Lnet/minecraft/class_2338;)V
named onBlockChanged
Lnet/minecraft/entity/ai/pathing/EntityNavigation;onBlockChanged(Lnet/minecraft/util/math/BlockPos;)V
-
isNearPathStartPos
public boolean isNearPathStartPos()- Mappings:
Namespace Name Mixin selector official t
Lazl;t()Z
intermediary method_31267
Lnet/minecraft/class_1408;method_31267()Z
named isNearPathStartPos
Lnet/minecraft/entity/ai/pathing/EntityNavigation;isNearPathStartPos()Z
-