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 pNode) protected booleancanStartAt(BlockPos pPos) static PathTypecheckNeighbourBlocks(PathfindingContext pContext, int pX, int pY, int pZ, PathType pPathType) private static booleandoesBlockHavePartialCollision(PathType pPathType) voiddone()protected NodefindAcceptedNode(int pX, int pY, int pZ, int pVerticalDeltaLimit, double pNodeFloorLevel, Direction pDirection, PathType pPathType) private NodegetBlockedNode(int pX, int pY, int pZ) protected PathTypegetCachedPathType(int pX, int pY, int pZ) private NodegetClosedNode(int pX, int pY, int pZ, PathType pPathType) protected doublegetFloorLevel(BlockPos pPos) static doublegetFloorLevel(BlockGetter pLevel, BlockPos pPos) private doubleintgetNeighbors(Node[] pOutputArray, Node pNode) private NodegetNodeAndUpdateCostToMax(int pX, int pY, int pZ, PathType pPathType, float pMalus) getPathType(PathfindingContext pContext, int pX, int pY, int pZ) protected static PathTypegetPathTypeFromState(BlockGetter pLevel, BlockPos pPos) getPathTypeOfMob(PathfindingContext pContext, int pX, int pY, int pZ, Mob pMob) static PathTypegetPathTypeStatic(Mob pMob, BlockPos pPos) static PathTypegetPathTypeStatic(PathfindingContext pContext, BlockPos.MutableBlockPos pPos) getPathTypeWithinMobBB(PathfindingContext pContext, int pX, int pY, int pZ) getStart()protected NodegetStartNode(BlockPos pPos) getTarget(double pX, double pY, double pZ) private booleanhasCollisions(AABB pBoundingBox) protected booleanprotected booleanisDiagonalValid(Node pNode) protected booleanisDiagonalValid(Node pRoot, Node pXNode, Node pZNode) protected booleanisNeighborValid(Node pNeighbor, Node pNode) voidprepare(PathNavigationRegion pLevel, Mob pMob) private NodetryFindFirstGroundNodeBelow(int pX, int pY, int pZ) private NodetryFindFirstNonWaterBelow(int pX, int pY, int pZ, Node pNode) private NodetryJumpOn(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:
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 pX, int pY, int pZ, int pVerticalDeltaLimit, double pNodeFloorLevel, Direction pDirection, PathType pPathType, BlockPos.MutableBlockPos pPos) -
tryFindFirstNonWaterBelow
-
tryFindFirstGroundNodeBelow
-
hasCollisions
-
getCachedPathType
-
getPathTypeOfMob
- Specified by:
getPathTypeOfMobin classNodeEvaluator
-
getPathTypeWithinMobBB
-
getPathType
- Specified by:
getPathTypein 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