Package net.minecraft.pathfinding
Class WalkNodeProcessor
- java.lang.Object
-
- net.minecraft.pathfinding.NodeProcessor
-
- net.minecraft.pathfinding.WalkNodeProcessor
-
- Direct Known Subclasses:
FlyingNodeProcessor,RavagerEntity.Processor,WalkAndSwimNodeProcessor
public class WalkNodeProcessor extends NodeProcessor
-
-
Field Summary
Fields Modifier and Type Field Description private it.unimi.dsi.fastutil.objects.Object2BooleanMap<AxisAlignedBB>collisionCacheprotected floatoldWaterCostprivate it.unimi.dsi.fastutil.longs.Long2ObjectMap<PathNodeType>pathTypesByPosCache-
Fields inherited from class net.minecraft.pathfinding.NodeProcessor
canFloat, canOpenDoors, canPassDoors, entityDepth, entityHeight, entityWidth, level, mob, nodes
-
-
Constructor Summary
Constructors Constructor Description WalkNodeProcessor()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private booleancanReachWithoutCollision(PathPoint p_237234_1_)static PathNodeTypecheckNeighbourBlocks(IBlockReader p_237232_0_, BlockPos.Mutable p_237232_1_, PathNodeType p_237232_2_)voiddone()protected PathNodeTypeevaluateBlockPathType(IBlockReader p_215744_1_, boolean p_215744_2_, boolean p_215744_3_, BlockPos p_215744_4_, PathNodeType p_215744_5_)private PathNodeTypegetBlockPathType(MobEntity p_186329_1_, BlockPos p_186329_2_)PathNodeTypegetBlockPathType(IBlockReader p_186330_1_, int p_186330_2_, int p_186330_3_, int p_186330_4_)PathNodeTypegetBlockPathType(IBlockReader p_186319_1_, int p_186319_2_, int p_186319_3_, int p_186319_4_, MobEntity p_186319_5_, int p_186319_6_, int p_186319_7_, int p_186319_8_, boolean p_186319_9_, boolean p_186319_10_)protected static PathNodeTypegetBlockPathTypeRaw(IBlockReader p_237238_0_, BlockPos p_237238_1_)PathNodeTypegetBlockPathTypes(IBlockReader p_193577_1_, int p_193577_2_, int p_193577_3_, int p_193577_4_, int p_193577_5_, int p_193577_6_, int p_193577_7_, boolean p_193577_8_, boolean p_193577_9_, java.util.EnumSet<PathNodeType> p_193577_10_, PathNodeType p_193577_11_, BlockPos p_193577_12_)static PathNodeTypegetBlockPathTypeStatic(IBlockReader p_237231_0_, BlockPos.Mutable p_237231_1_)private PathNodeTypegetCachedBlockType(MobEntity p_237230_1_, int p_237230_2_, int p_237230_3_, int p_237230_4_)static doublegetFloorLevel(IBlockReader p_197682_0_, BlockPos p_197682_1_)FlaggedPathPointgetGoal(double p_224768_1_, double p_224768_3_, double p_224768_5_)private PathPointgetLandNode(int p_186332_1_, int p_186332_2_, int p_186332_3_, int p_186332_4_, double p_186332_5_, Direction p_186332_7_, PathNodeType p_186332_8_)intgetNeighbors(PathPoint[] p_222859_1_, PathPoint p_222859_2_)PathPointgetStart()private booleanhasCollisions(AxisAlignedBB p_237236_1_)private booleanhasPositiveMalus(BlockPos p_237239_1_)private static booleanisBurningBlock(BlockState p_237233_0_)private booleanisDiagonalValid(PathPoint p_222860_1_, PathPoint p_222860_2_, PathPoint p_222860_3_, PathPoint p_222860_4_)private booleanisNeighborValid(PathPoint p_237235_1_, PathPoint p_237235_2_)voidprepare(Region p_225578_1_, MobEntity p_225578_2_)-
Methods inherited from class net.minecraft.pathfinding.NodeProcessor
canFloat, canOpenDoors, canPassDoors, getNode, getNode, setCanFloat, setCanOpenDoors, setCanPassDoors
-
-
-
-
Field Detail
-
oldWaterCost
protected float oldWaterCost
-
pathTypesByPosCache
private final it.unimi.dsi.fastutil.longs.Long2ObjectMap<PathNodeType> pathTypesByPosCache
-
collisionCache
private final it.unimi.dsi.fastutil.objects.Object2BooleanMap<AxisAlignedBB> collisionCache
-
-
Method Detail
-
prepare
public void prepare(Region p_225578_1_, MobEntity p_225578_2_)
- Overrides:
preparein classNodeProcessor
-
done
public void done()
- Overrides:
donein classNodeProcessor
-
getStart
public PathPoint getStart()
- Specified by:
getStartin classNodeProcessor
-
hasPositiveMalus
private boolean hasPositiveMalus(BlockPos p_237239_1_)
-
getGoal
public FlaggedPathPoint getGoal(double p_224768_1_, double p_224768_3_, double p_224768_5_)
- Specified by:
getGoalin classNodeProcessor
-
getNeighbors
public int getNeighbors(PathPoint[] p_222859_1_, PathPoint p_222859_2_)
- Specified by:
getNeighborsin classNodeProcessor
-
isDiagonalValid
private boolean isDiagonalValid(PathPoint p_222860_1_, @Nullable PathPoint p_222860_2_, @Nullable PathPoint p_222860_3_, @Nullable PathPoint p_222860_4_)
-
canReachWithoutCollision
private boolean canReachWithoutCollision(PathPoint p_237234_1_)
-
getFloorLevel
public static double getFloorLevel(IBlockReader p_197682_0_, BlockPos p_197682_1_)
-
getLandNode
@Nullable private PathPoint getLandNode(int p_186332_1_, int p_186332_2_, int p_186332_3_, int p_186332_4_, double p_186332_5_, Direction p_186332_7_, PathNodeType p_186332_8_)
-
hasCollisions
private boolean hasCollisions(AxisAlignedBB p_237236_1_)
-
getBlockPathType
public PathNodeType getBlockPathType(IBlockReader p_186319_1_, int p_186319_2_, int p_186319_3_, int p_186319_4_, MobEntity p_186319_5_, int p_186319_6_, int p_186319_7_, int p_186319_8_, boolean p_186319_9_, boolean p_186319_10_)
- Specified by:
getBlockPathTypein classNodeProcessor
-
getBlockPathTypes
public PathNodeType getBlockPathTypes(IBlockReader p_193577_1_, int p_193577_2_, int p_193577_3_, int p_193577_4_, int p_193577_5_, int p_193577_6_, int p_193577_7_, boolean p_193577_8_, boolean p_193577_9_, java.util.EnumSet<PathNodeType> p_193577_10_, PathNodeType p_193577_11_, BlockPos p_193577_12_)
-
evaluateBlockPathType
protected PathNodeType evaluateBlockPathType(IBlockReader p_215744_1_, boolean p_215744_2_, boolean p_215744_3_, BlockPos p_215744_4_, PathNodeType p_215744_5_)
-
getBlockPathType
private PathNodeType getBlockPathType(MobEntity p_186329_1_, BlockPos p_186329_2_)
-
getCachedBlockType
private PathNodeType getCachedBlockType(MobEntity p_237230_1_, int p_237230_2_, int p_237230_3_, int p_237230_4_)
-
getBlockPathType
public PathNodeType getBlockPathType(IBlockReader p_186330_1_, int p_186330_2_, int p_186330_3_, int p_186330_4_)
- Specified by:
getBlockPathTypein classNodeProcessor
-
getBlockPathTypeStatic
public static PathNodeType getBlockPathTypeStatic(IBlockReader p_237231_0_, BlockPos.Mutable p_237231_1_)
-
checkNeighbourBlocks
public static PathNodeType checkNeighbourBlocks(IBlockReader p_237232_0_, BlockPos.Mutable p_237232_1_, PathNodeType p_237232_2_)
-
getBlockPathTypeRaw
protected static PathNodeType getBlockPathTypeRaw(IBlockReader p_237238_0_, BlockPos p_237238_1_)
-
isBurningBlock
private static boolean isBurningBlock(BlockState p_237233_0_)
-
-