Class WalkNodeEvaluator
java.lang.Object
net.minecraft.world.level.pathfinder.NodeEvaluator
net.minecraft.world.level.pathfinder.WalkNodeEvaluator
- Direct Known Subclasses:
AmphibiousNodeEvaluator,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[] outputArray, Node p_node) private NodegetNodeAndUpdateCostToMax(int x, int y, int z, PathType pathType, float malus) getPathType(PathfindingContext context, int x, int y, int z) protected static PathTypegetPathTypeFromState(BlockGetter level, BlockPos pos) getPathTypeOfMob(PathfindingContext context, int x, int y, int z, Mob mob) 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 x, double y, double z) 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 level, Mob mob) 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
- Specified by:
getPathTypeOfMobin classNodeEvaluator
-
getPathTypeWithinMobBB
-
getPathType
- Specified by:
getPathTypein classNodeEvaluator
-
getPathTypeStatic
-
getPathTypeStatic
-
checkNeighbourBlocks
public static PathType checkNeighbourBlocks(PathfindingContext context, int x, int y, int z, PathType pathType) -
getPathTypeFromState