Class WalkNodeEvaluator
java.lang.Object
net.minecraft.world.level.pathfinder.NodeEvaluator
net.minecraft.world.level.pathfinder.WalkNodeEvaluator
- Direct Known Subclasses:
AmphibiousNodeEvaluator
,Creaking.HomeNodeEvaluator
,FlyNodeEvaluator
-
Field Summary
FieldsModifier 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
canReachWithoutCollision
(Node pNode) protected boolean
canStartAt
(BlockPos pPos) static PathType
checkNeighbourBlocks
(PathfindingContext pContext, int pX, int pY, int pZ, PathType pPathType) private static boolean
doesBlockHavePartialCollision
(PathType pPathType) void
done()
protected Node
findAcceptedNode
(int pX, int pY, int pZ, int pVerticalDeltaLimit, double pNodeFloorLevel, Direction pDirection, PathType pPathType) private Node
getBlockedNode
(int pX, int pY, int pZ) protected PathType
getCachedPathType
(int pX, int pY, int pZ) private Node
getClosedNode
(int pX, int pY, int pZ, PathType pPathType) protected double
getFloorLevel
(BlockPos pPos) static double
getFloorLevel
(BlockGetter pLevel, BlockPos pPos) private double
int
getNeighbors
(Node[] p_77640_, Node p_77641_) private Node
getNodeAndUpdateCostToMax
(int pX, int pY, int pZ, PathType pPathType, float pMalus) getPathType
(PathfindingContext p_330217_, int p_326856_, int p_326857_, int p_326859_) protected static PathType
getPathTypeFromState
(BlockGetter pLevel, BlockPos pPos) getPathTypeOfMob
(PathfindingContext p_330551_, int p_326939_, int p_326943_, int p_326876_, Mob p_326786_) static PathType
getPathTypeStatic
(Mob pMob, BlockPos pPos) static PathType
getPathTypeStatic
(PathfindingContext pContext, BlockPos.MutableBlockPos pPos) getPathTypeWithinMobBB
(PathfindingContext pContext, int pX, int pY, int pZ) getStart()
protected Node
getStartNode
(BlockPos pPos) getTarget
(double p_326793_, double p_326919_, double p_326802_) private boolean
hasCollisions
(AABB pBoundingBox) protected boolean
protected boolean
isDiagonalValid
(Node pNode) protected boolean
isDiagonalValid
(Node pRoot, Node pXNode, Node pZNode) protected boolean
isNeighborValid
(Node pNeighbor, Node pNode) void
prepare
(PathNavigationRegion p_77620_, Mob p_77621_) private Node
tryFindFirstGroundNodeBelow
(int pX, int pY, int pZ) private Node
tryFindFirstNonWaterBelow
(int pX, int pY, int pZ, Node pNode) private Node
tryJumpOn
(int pX, int pY, int pZ, int pVerticalDeltaLimit, double pNodeFloorLevel, Direction pDirection, PathType pPathType, BlockPos.MutableBlockPos pPos) 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 pX, int pY, int pZ, int pVerticalDeltaLimit, double pNodeFloorLevel, Direction pDirection, PathType pPathType, BlockPos.MutableBlockPos pPos) -
tryFindFirstNonWaterBelow
-
tryFindFirstGroundNodeBelow
-
hasCollisions
-
getCachedPathType
-
getPathTypeOfMob
public PathType getPathTypeOfMob(PathfindingContext p_330551_, int p_326939_, int p_326943_, int p_326876_, Mob p_326786_) - Specified by:
getPathTypeOfMob
in classNodeEvaluator
-
getPathTypeWithinMobBB
-
getPathType
public PathType getPathType(PathfindingContext p_330217_, int p_326856_, int p_326857_, int p_326859_) - Specified by:
getPathType
in classNodeEvaluator
-
getPathTypeStatic
-
getPathTypeStatic
public static PathType getPathTypeStatic(PathfindingContext pContext, BlockPos.MutableBlockPos pPos) -
checkNeighbourBlocks
public static PathType checkNeighbourBlocks(PathfindingContext pContext, int pX, int pY, int pZ, PathType pPathType) -
getPathTypeFromState