Class WalkNodeEvaluator
java.lang.Object
net.minecraft.world.level.pathfinder.NodeEvaluator
net.minecraft.world.level.pathfinder.WalkNodeEvaluator
- Direct Known Subclasses:
AmphibiousNodeEvaluator
,FlyNodeEvaluator
,Ravager.RavagerNodeEvaluator
-
Field Summary
Modifier and TypeFieldDescriptionprivate final it.unimi.dsi.fastutil.objects.Object2BooleanMap<AABB>
protected float
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, entityDepth, entityHeight, entityWidth, level, mob, nodes
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate boolean
canReachWithoutCollision
(Node p_77625_) 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_77614_, boolean p_77615_, boolean p_77616_, BlockPos p_77617_, BlockPathTypes p_77618_) 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_) private BlockPathTypes
getBlockPathType
(Mob p_77573_, BlockPos p_77574_) getBlockPathType
(BlockGetter p_77576_, int p_77577_, int p_77578_, int p_77579_) getBlockPathType
(BlockGetter p_77594_, int p_77595_, int p_77596_, int p_77597_, Mob p_77598_, int p_77599_, int p_77600_, int p_77601_, boolean p_77602_, boolean p_77603_) protected static BlockPathTypes
getBlockPathTypeRaw
(BlockGetter p_77644_, BlockPos p_77645_) getBlockPathTypes
(BlockGetter p_77581_, int p_77582_, int p_77583_, int p_77584_, int p_77585_, int p_77586_, int p_77587_, boolean p_77588_, boolean p_77589_, EnumSet<BlockPathTypes> p_77590_, BlockPathTypes p_77591_, BlockPos p_77592_) 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_) 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_) private boolean
hasPositiveMalus
(BlockPos p_77647_) 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, getNode, getNode, getTargetFromNode, setCanFloat, setCanOpenDoors, setCanPassDoors
-
Field Details
-
SPACE_BETWEEN_WALL_POSTS
public static final double SPACE_BETWEEN_WALL_POSTS- See Also:
-
oldWaterCost
protected float oldWaterCost -
pathTypesByPosCache
-
collisionCache
-
-
Constructor Details
-
WalkNodeEvaluator
public WalkNodeEvaluator()
-
-
Method Details
-
done
public void done()- Overrides:
done
in classNodeEvaluator
-
getStart
- Specified by:
getStart
in classNodeEvaluator
-
getStartNode
-
hasPositiveMalus
-
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_) -
getNodeAndUpdateCostToMax
@Nullable 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_77594_, int p_77595_, int p_77596_, int p_77597_, Mob p_77598_, int p_77599_, int p_77600_, int p_77601_, boolean p_77602_, boolean p_77603_) - Specified by:
getBlockPathType
in classNodeEvaluator
-
getBlockPathTypes
public BlockPathTypes getBlockPathTypes(BlockGetter p_77581_, int p_77582_, int p_77583_, int p_77584_, int p_77585_, int p_77586_, int p_77587_, boolean p_77588_, boolean p_77589_, EnumSet<BlockPathTypes> p_77590_, BlockPathTypes p_77591_, BlockPos p_77592_) -
evaluateBlockPathType
protected BlockPathTypes evaluateBlockPathType(BlockGetter p_77614_, boolean p_77615_, boolean p_77616_, BlockPos p_77617_, BlockPathTypes p_77618_) -
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