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_331893_, int p_332169_, int p_330433_, int p_331506_, PathType p_326944_) private static boolean
doesBlockHavePartialCollision
(PathType p_326827_) 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_326873_) private Node
getBlockedNode
(int p_230628_, int p_230629_, int p_230630_) protected PathType
getCachedPathType
(int p_326926_, int p_326795_, int p_326824_) private Node
getClosedNode
(int p_326935_, int p_326904_, int p_326845_, PathType p_326820_) 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_326789_, float p_230624_) getPathType
(PathfindingContext p_330217_, int p_326856_, int p_326857_, int p_326859_) protected static PathType
getPathTypeFromState
(BlockGetter p_77644_, BlockPos p_77645_) getPathTypeOfMob
(PathfindingContext p_330551_, int p_326939_, int p_326943_, int p_326876_, Mob p_326786_) static PathType
getPathTypeStatic
(Mob p_332010_, BlockPos p_330520_) static PathType
getPathTypeStatic
(PathfindingContext p_330755_, BlockPos.MutableBlockPos p_331020_) getPathTypeWithinMobBB
(PathfindingContext p_331617_, int p_326916_, int p_326906_, int p_326848_) getStart()
protected Node
getStartNode
(BlockPos p_230632_) getTarget
(double p_326793_, double p_326919_, double p_326802_) private boolean
hasCollisions
(AABB p_77635_) protected boolean
protected boolean
isDiagonalValid
(Node p_77630_) protected boolean
isDiagonalValid
(Node p_326907_, Node p_326803_, Node p_326821_) protected boolean
isNeighborValid
(Node p_77627_, Node p_77628_) void
prepare
(PathNavigationRegion p_77620_, Mob p_77621_) private Node
tryFindFirstGroundNodeBelow
(int p_326892_, int p_326901_, int p_326809_) private Node
tryFindFirstNonWaterBelow
(int p_326959_, int p_326927_, int p_326932_, Node p_326880_) private Node
tryJumpOn
(int p_326914_, int p_326900_, int p_326886_, int p_326902_, double p_326800_, Direction p_326868_, PathType p_326831_, BlockPos.MutableBlockPos p_326839_) 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_326914_, int p_326900_, int p_326886_, int p_326902_, double p_326800_, Direction p_326868_, PathType p_326831_, BlockPos.MutableBlockPos p_326839_) -
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
public Set<PathType> getPathTypeWithinMobBB(PathfindingContext p_331617_, int p_326916_, int p_326906_, int p_326848_) -
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 p_330755_, BlockPos.MutableBlockPos p_331020_) -
checkNeighbourBlocks
public static PathType checkNeighbourBlocks(PathfindingContext p_331893_, int p_332169_, int p_330433_, int p_331506_, PathType p_326944_) -
getPathTypeFromState