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 doubleprivate final it.unimi.dsi.fastutil.longs.Long2ObjectMap<PathType> private final Node[]static final doubleFields 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 booleancanReachWithoutCollision(Node node) protected booleancanStartAt(BlockPos pos) static PathTypecheckNeighbourBlocks(PathfindingContext context, int x, int y, int z, PathType pathType) private static booleandoesBlockHavePartialCollision(PathType pathType) voiddone()protected NodefindAcceptedNode(int x, int y, int z, int verticalDeltaLimit, double nodeFloorLevel, Direction direction, PathType pathType) private NodegetBlockedNode(int x, int y, int z) protected PathTypegetCachedPathType(int x, int y, int z) private NodegetClosedNode(int x, int y, int z, PathType pathType) protected doublegetFloorLevel(BlockPos pos) static doublegetFloorLevel(BlockGetter level, BlockPos pos) private doubleintgetNeighbors(Node[] p_77640_, Node p_77641_) private NodegetNodeAndUpdateCostToMax(int x, int y, int z, PathType pathType, float malus) getPathType(PathfindingContext p_330217_, int p_326856_, int p_326857_, int p_326859_) protected static PathTypegetPathTypeFromState(BlockGetter level, BlockPos pos) getPathTypeOfMob(PathfindingContext p_330551_, int p_326939_, int p_326943_, int p_326876_, Mob p_326786_) static PathTypegetPathTypeStatic(Mob mob, BlockPos pos) static PathTypegetPathTypeStatic(PathfindingContext context, BlockPos.MutableBlockPos pos) getPathTypeWithinMobBB(PathfindingContext context, int x, int y, int z) getStart()protected NodegetStartNode(BlockPos pos) getTarget(double p_326793_, double p_326919_, double p_326802_) private booleanhasCollisions(AABB boundingBox) protected booleanprotected booleanisDiagonalValid(Node node) protected booleanisDiagonalValid(Node root, Node xNode, Node zNode) protected booleanisNeighborValid(Node neighbor, Node node) voidprepare(PathNavigationRegion p_77620_, Mob p_77621_) private NodetryFindFirstGroundNodeBelow(int x, int y, int z) private NodetryFindFirstNonWaterBelow(int x, int y, int z, Node node) private NodetryJumpOn(int x, int y, int z, int verticalDeltaLimit, double nodeFloorLevel, Direction direction, PathType pathType, BlockPos.MutableBlockPos pos) 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:
donein classNodeEvaluator
-
getStart
- Specified by:
getStartin classNodeEvaluator
-
getStartNode
-
canStartAt
-
getTarget
- Specified by:
getTargetin classNodeEvaluator
-
getNeighbors
- Specified by:
getNeighborsin 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 x, int y, int z, int verticalDeltaLimit, double nodeFloorLevel, Direction direction, PathType pathType, BlockPos.MutableBlockPos pos) -
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:
getPathTypeOfMobin classNodeEvaluator
-
getPathTypeWithinMobBB
-
getPathType
public PathType getPathType(PathfindingContext p_330217_, int p_326856_, int p_326857_, int p_326859_) - Specified by:
getPathTypein classNodeEvaluator
-
getPathTypeStatic
-
getPathTypeStatic
-
checkNeighbourBlocks
public static PathType checkNeighbourBlocks(PathfindingContext context, int x, int y, int z, PathType pathType) -
getPathTypeFromState