Package net.minecraft.entity.ai.pathing
Class LandPathNodeMaker
java.lang.Object
net.minecraft.entity.ai.pathing.PathNodeMaker
net.minecraft.entity.ai.pathing.LandPathNodeMaker
- Direct Known Subclasses:
AmphibiousPathNodeMaker,BirdPathNodeMaker,RavagerEntity.PathNodeMaker
public class LandPathNodeMaker extends PathNodeMaker
-
Field Summary
Fields Modifier and Type Field Description private Long2ObjectMap<PathNodeType>field_25190private Object2BooleanMap<Box>field_25191protected floatwaterPathNodeTypeWeightFields inherited from class net.minecraft.entity.ai.pathing.PathNodeMaker
cachedWorld, canEnterOpenDoors, canOpenDoors, canSwim, entity, entityBlockXSize, entityBlockYSize, entityBlockZSize, pathNodeCache -
Constructor Summary
Constructors Constructor Description LandPathNodeMaker() -
Method Summary
Modifier and Type Method Description protected PathNodeTypeadjustNodeType(BlockView world, boolean canOpenDoors, boolean canEnterOpenDoors, BlockPos pos, PathNodeType type)voidclear()PathNodeTypefindNearbyNodeTypes(BlockView world, int x, int y, int z, int sizeX, int sizeY, int sizeZ, boolean canOpenDoors, boolean canEnterOpenDoors, EnumSet<PathNodeType> nearbyTypes, PathNodeType type, BlockPos pos)Adds the node types in the box with the given size to the input EnumSet.protected static PathNodeTypegetCommonNodeType(BlockView blockView, BlockPos blockPos)PathNodeTypegetDefaultNodeType(BlockView world, int x, int y, int z)Gets the path node type at the given position without adjusting the node type according to whether the entity can enter or open doorsstatic doublegetFeetY(BlockView world, BlockPos pos)static PathNodeTypegetLandNodeType(BlockView blockView, BlockPos.Mutable mutable)TargetPathNodegetNode(double x, double y, double z)private PathNodeTypegetNodeType(MobEntity entity, BlockPos pos)PathNodeTypegetNodeType(BlockView world, int x, int y, int z, MobEntity mob, int sizeX, int sizeY, int sizeZ, boolean canOpenDoors, boolean canEnterOpenDoors)static PathNodeTypegetNodeTypeFromNeighbors(BlockView blockView, BlockPos.Mutable mutable, PathNodeType pathNodeType)private PathNodegetPathNode(int x, int y, int z, int maxYStep, double prevFeetY, Direction direction, PathNodeType pathNodeType)PathNodegetStart()intgetSuccessors(PathNode[] successors, PathNode node)voidinit(ChunkCache cachedWorld, MobEntity entity)private booleanisValidDiagonalSuccessor(PathNode node, PathNode successor1)private static booleanmethod_27138(BlockState blockState)private booleanmethod_27139(BlockPos blockPos)private PathNodeTypemethod_29303(MobEntity mobEntity, int int2, int int3, int int4)private booleanmethod_29304(Box box)private booleanmethod_29578(PathNode pathNode)private booleanmethod_29579(PathNode pathNode, PathNode pathNode2, PathNode pathNode3, PathNode pathNode4)Methods inherited from class net.minecraft.entity.ai.pathing.PathNodeMaker
canEnterOpenDoors, canOpenDoors, canSwim, getNode, method_27137, setCanEnterOpenDoors, setCanOpenDoors, setCanSwim
-
Field Details
-
waterPathNodeTypeWeight
protected float waterPathNodeTypeWeight -
field_25190
-
field_25191
-
-
Constructor Details
-
LandPathNodeMaker
public LandPathNodeMaker()
-
-
Method Details
-
init
- Overrides:
initin classPathNodeMaker
-
clear
public void clear()- Overrides:
clearin classPathNodeMaker
-
getStart
- Specified by:
getStartin classPathNodeMaker
-
method_27139
-
getNode
- Specified by:
getNodein classPathNodeMaker
-
getSuccessors
- Specified by:
getSuccessorsin classPathNodeMaker
-
isValidDiagonalSuccessor
-
method_29579
-
method_29578
-
getFeetY
-
getPathNode
@Nullable private PathNode getPathNode(int x, int y, int z, int maxYStep, double prevFeetY, Direction direction, PathNodeType pathNodeType) -
method_29304
-
getNodeType
public PathNodeType getNodeType(BlockView world, int x, int y, int z, MobEntity mob, int sizeX, int sizeY, int sizeZ, boolean canOpenDoors, boolean canEnterOpenDoors)- Specified by:
getNodeTypein classPathNodeMaker
-
findNearbyNodeTypes
public PathNodeType findNearbyNodeTypes(BlockView world, int x, int y, int z, int sizeX, int sizeY, int sizeZ, boolean canOpenDoors, boolean canEnterOpenDoors, EnumSet<PathNodeType> nearbyTypes, PathNodeType type, BlockPos pos)Adds the node types in the box with the given size to the input EnumSet.- Returns:
- The node type at the least coordinates of the input box.
-
adjustNodeType
protected PathNodeType adjustNodeType(BlockView world, boolean canOpenDoors, boolean canEnterOpenDoors, BlockPos pos, PathNodeType type) -
getNodeType
-
method_29303
-
getDefaultNodeType
Gets the path node type at the given position without adjusting the node type according to whether the entity can enter or open doors- Specified by:
getDefaultNodeTypein classPathNodeMaker
-
getLandNodeType
-
getNodeTypeFromNeighbors
public static PathNodeType getNodeTypeFromNeighbors(BlockView blockView, BlockPos.Mutable mutable, PathNodeType pathNodeType) -
getCommonNodeType
-
method_27138
-