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<BlockPathTypes>
static final double
Fields inherited from class net.minecraft.world.level.pathfinder.NodeEvaluator
canFloat, canOpenDoors, canPassDoors, canWalkOverFences, entityDepth, entityHeight, entityWidth, level, mob, nodes
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
canReachWithoutCollision
(Node p_77625_) protected boolean
canStartAt
(BlockPos p_262596_) static BlockPathTypes
checkNeighbourBlocks
(BlockGetter p_77608_, BlockPos.MutableBlockPos p_77609_, BlockPathTypes p_77610_) private static boolean
doesBlockHavePartialCollision
(BlockPathTypes p_230626_) void
done()
protected BlockPathTypes
evaluateBlockPathType
(BlockGetter p_265305_, BlockPos p_265350_, BlockPathTypes p_265551_) protected Node
findAcceptedNode
(int p_164726_, int p_164727_, int p_164728_, int p_164729_, double p_164730_, Direction p_164731_, BlockPathTypes p_164732_) private Node
getBlockedNode
(int p_230628_, int p_230629_, int p_230630_) protected BlockPathTypes
getBlockPathType
(Mob p_77573_, BlockPos p_77574_) getBlockPathType
(BlockGetter p_77576_, int p_77577_, int p_77578_, int p_77579_) getBlockPathType
(BlockGetter p_265141_, int p_265661_, int p_265757_, int p_265716_, Mob p_265398_) protected static BlockPathTypes
getBlockPathTypeRaw
(BlockGetter p_77644_, BlockPos p_77645_) getBlockPathTypes
(BlockGetter p_265227_, int p_265066_, int p_265537_, int p_265771_, EnumSet<BlockPathTypes> p_265263_, BlockPathTypes p_265458_, BlockPos p_265515_) static BlockPathTypes
getBlockPathTypeStatic
(BlockGetter p_77605_, BlockPos.MutableBlockPos p_77606_) protected BlockPathTypes
getCachedBlockType
(Mob p_77568_, int p_77569_, int p_77570_, int p_77571_) protected double
getFloorLevel
(BlockPos p_164733_) static double
getFloorLevel
(BlockGetter p_77612_, BlockPos p_77613_) getGoal
(double p_77550_, double p_77551_, double p_77552_) private double
int
getNeighbors
(Node[] p_77640_, Node p_77641_) private Node
getNodeAndUpdateCostToMax
(int p_230620_, int p_230621_, int p_230622_, BlockPathTypes p_230623_, float p_230624_) getStart()
protected Node
getStartNode
(BlockPos p_230632_) private boolean
hasCollisions
(AABB p_77635_) protected boolean
static boolean
isBurningBlock
(BlockState p_77623_) protected boolean
isDiagonalValid
(Node p_77630_, Node p_77631_, Node p_77632_, Node p_77633_) protected boolean
isNeighborValid
(Node p_77627_, Node p_77628_) void
prepare
(PathNavigationRegion p_77620_, Mob p_77621_) Methods inherited from class net.minecraft.world.level.pathfinder.NodeEvaluator
canFloat, canOpenDoors, canPassDoors, canWalkOverFences, getNode, getNode, getTargetFromNode, 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:
-
pathTypesByPosCache
-
collisionCache
-
-
Constructor Details
-
WalkNodeEvaluator
public WalkNodeEvaluator()
-
-
Method Details
-
done
public void done()- Overrides:
done
in classNodeEvaluator
-
getStart
- Specified by:
getStart
in classNodeEvaluator
-
getStartNode
-
canStartAt
-
getGoal
- Specified by:
getGoal
in classNodeEvaluator
-
getNeighbors
- Specified by:
getNeighbors
in classNodeEvaluator
-
isNeighborValid
-
isDiagonalValid
-
doesBlockHavePartialCollision
-
canReachWithoutCollision
-
getFloorLevel
-
getFloorLevel
-
isAmphibious
protected boolean isAmphibious() -
findAcceptedNode
@Nullable protected Node findAcceptedNode(int p_164726_, int p_164727_, int p_164728_, int p_164729_, double p_164730_, Direction p_164731_, BlockPathTypes p_164732_) -
getMobJumpHeight
private double getMobJumpHeight() -
getNodeAndUpdateCostToMax
private Node getNodeAndUpdateCostToMax(int p_230620_, int p_230621_, int p_230622_, BlockPathTypes p_230623_, float p_230624_) -
getBlockedNode
-
hasCollisions
-
getBlockPathType
public BlockPathTypes getBlockPathType(BlockGetter p_265141_, int p_265661_, int p_265757_, int p_265716_, Mob p_265398_) - Specified by:
getBlockPathType
in classNodeEvaluator
-
getBlockPathTypes
public BlockPathTypes getBlockPathTypes(BlockGetter p_265227_, int p_265066_, int p_265537_, int p_265771_, EnumSet<BlockPathTypes> p_265263_, BlockPathTypes p_265458_, BlockPos p_265515_) -
evaluateBlockPathType
protected BlockPathTypes evaluateBlockPathType(BlockGetter p_265305_, BlockPos p_265350_, BlockPathTypes p_265551_) -
getBlockPathType
-
getCachedBlockType
-
getBlockPathType
public BlockPathTypes getBlockPathType(BlockGetter p_77576_, int p_77577_, int p_77578_, int p_77579_) - Specified by:
getBlockPathType
in classNodeEvaluator
-
getBlockPathTypeStatic
public static BlockPathTypes getBlockPathTypeStatic(BlockGetter p_77605_, BlockPos.MutableBlockPos p_77606_) -
checkNeighbourBlocks
public static BlockPathTypes checkNeighbourBlocks(BlockGetter p_77608_, BlockPos.MutableBlockPos p_77609_, BlockPathTypes p_77610_) -
getBlockPathTypeRaw
-
isBurningBlock