Class WalkNodeEvaluator
java.lang.Object
net.minecraft.world.level.pathfinder.NodeEvaluator
net.minecraft.world.level.pathfinder.WalkNodeEvaluator
- Direct Known Subclasses:
AmphibiousNodeEvaluator
,FlyNodeEvaluator
-
Field Summary
Modifier and TypeFieldDescriptionprivate final it.unimi.dsi.fastutil.objects.Object2BooleanMap
<AABB> private static final double
private final it.unimi.dsi.fastutil.longs.Long2ObjectMap
<PathType> private final Node[]
static final double
Fields inherited from class net.minecraft.world.level.pathfinder.NodeEvaluator
canFloat, canOpenDoors, canPassDoors, canWalkOverFences, currentContext, entityDepth, entityHeight, entityWidth, mob, nodes
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
canReachWithoutCollision
(Node p_77625_) protected boolean
canStartAt
(BlockPos p_262596_) static PathType
checkNeighbourBlocks
(PathfindingContext p_334221_, int p_336062_, int p_335259_, int p_336315_, PathType p_333971_) private static boolean
doesBlockHavePartialCollision
(PathType p_332557_) void
done()
protected Node
findAcceptedNode
(int p_164726_, int p_164727_, int p_164728_, int p_164729_, double p_164730_, Direction p_164731_, PathType p_330077_) private Node
getBlockedNode
(int p_230628_, int p_230629_, int p_230630_) protected PathType
getCachedPathType
(int p_328411_, int p_334833_, int p_334446_) private Node
getClosedNode
(int p_332713_, int p_333094_, int p_327804_, PathType p_334600_) protected double
getFloorLevel
(BlockPos p_164733_) static double
getFloorLevel
(BlockGetter p_77612_, BlockPos p_77613_) private double
int
getNeighbors
(Node[] p_77640_, Node p_77641_) private Node
getNodeAndUpdateCostToMax
(int p_230620_, int p_230621_, int p_230622_, PathType p_335762_, float p_230624_) getPathType
(PathfindingContext p_333098_, int p_327758_, int p_329863_, int p_328680_) protected static PathType
getPathTypeFromState
(BlockGetter p_335222_, BlockPos p_331935_) getPathTypeOfMob
(PathfindingContext p_336212_, int p_330284_, int p_332224_, int p_335362_, Mob p_327680_) static PathType
getPathTypeStatic
(Mob p_332988_, BlockPos p_332803_) static PathType
getPathTypeStatic
(PathfindingContext p_335315_, BlockPos.MutableBlockPos p_334167_) getPathTypeWithinMobBB
(PathfindingContext p_334304_, int p_335980_, int p_330052_, int p_334476_) getStart()
protected Node
getStartNode
(BlockPos p_230632_) getTarget
(double p_334058_, double p_329070_, double p_328068_) private boolean
hasCollisions
(AABB p_77635_) protected boolean
protected boolean
isDiagonalValid
(Node p_332817_) protected boolean
isDiagonalValid
(Node p_77630_, Node p_77631_, Node p_77632_) protected boolean
isNeighborValid
(Node p_77627_, Node p_77628_) void
prepare
(PathNavigationRegion p_77620_, Mob p_77621_) private Node
tryFindFirstGroundNodeBelow
(int p_335495_, int p_328639_, int p_335885_) private Node
tryFindFirstNonWaterBelow
(int p_334565_, int p_335840_, int p_330496_, Node p_327969_) private Node
tryJumpOn
(int p_335353_, int p_333388_, int p_331837_, int p_329120_, double p_335627_, Direction p_334618_, PathType p_330418_, BlockPos.MutableBlockPos p_329431_) Methods inherited from class net.minecraft.world.level.pathfinder.NodeEvaluator
canFloat, canOpenDoors, canPassDoors, canWalkOverFences, getNode, getNode, getPathType, getTargetNodeAt, isBurningBlock, setCanFloat, setCanOpenDoors, setCanPassDoors, setCanWalkOverFences
-
Field Details
-
SPACE_BETWEEN_WALL_POSTS
public static final double SPACE_BETWEEN_WALL_POSTS- See Also:
-
DEFAULT_MOB_JUMP_HEIGHT
private static final double DEFAULT_MOB_JUMP_HEIGHT- See Also:
-
pathTypesByPosCacheByMob
-
collisionCache
-
reusableNeighbors
-
-
Constructor Details
-
WalkNodeEvaluator
public WalkNodeEvaluator()
-
-
Method Details
-
done
public void done()- Overrides:
done
in classNodeEvaluator
-
getStart
- Specified by:
getStart
in classNodeEvaluator
-
getStartNode
-
canStartAt
-
getTarget
- Specified by:
getTarget
in classNodeEvaluator
-
getNeighbors
- Specified by:
getNeighbors
in classNodeEvaluator
-
isNeighborValid
-
isDiagonalValid
-
isDiagonalValid
-
doesBlockHavePartialCollision
-
canReachWithoutCollision
-
getFloorLevel
-
getFloorLevel
-
isAmphibious
protected boolean isAmphibious() -
findAcceptedNode
-
getMobJumpHeight
private double getMobJumpHeight() -
getNodeAndUpdateCostToMax
-
getBlockedNode
-
getClosedNode
-
tryJumpOn
@Nullable private Node tryJumpOn(int p_335353_, int p_333388_, int p_331837_, int p_329120_, double p_335627_, Direction p_334618_, PathType p_330418_, BlockPos.MutableBlockPos p_329431_) -
tryFindFirstNonWaterBelow
-
tryFindFirstGroundNodeBelow
-
hasCollisions
-
getCachedPathType
-
getPathTypeOfMob
public PathType getPathTypeOfMob(PathfindingContext p_336212_, int p_330284_, int p_332224_, int p_335362_, Mob p_327680_) - Specified by:
getPathTypeOfMob
in classNodeEvaluator
-
getPathTypeWithinMobBB
public Set<PathType> getPathTypeWithinMobBB(PathfindingContext p_334304_, int p_335980_, int p_330052_, int p_334476_) -
getPathType
public PathType getPathType(PathfindingContext p_333098_, int p_327758_, int p_329863_, int p_328680_) - Specified by:
getPathType
in classNodeEvaluator
-
getPathTypeStatic
-
getPathTypeStatic
public static PathType getPathTypeStatic(PathfindingContext p_335315_, BlockPos.MutableBlockPos p_334167_) -
checkNeighbourBlocks
public static PathType checkNeighbourBlocks(PathfindingContext p_334221_, int p_336062_, int p_335259_, int p_336315_, PathType p_333971_) -
getPathTypeFromState