public class LandPathNodeMaker extends PathNodeMaker
Modifier and Type | Field and Description |
---|---|
protected float |
waterPathNodeTypeWeight |
cachedWorld, canEnterOpenDoors, canOpenDoors, canSwim, entity, entityBlockXSize, entityBlockYSize, entityBlockZSize, pathNodeCache
Constructor and Description |
---|
LandPathNodeMaker() |
Modifier and Type | Method and Description |
---|---|
protected PathNodeType |
adjustNodeType(BlockView world,
boolean canOpenDoors,
boolean canEnterOpenDoors,
BlockPos pos,
PathNodeType type) |
void |
clear() |
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.
|
protected static PathNodeType |
getCommonNodeType(BlockView blockView,
BlockPos blockPos) |
PathNodeType |
getDefaultNodeType(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 doors
|
static double |
getFeetY(BlockView world,
BlockPos pos) |
static PathNodeType |
getLandNodeType(BlockView blockView,
BlockPos.Mutable mutable) |
TargetPathNode |
getNode(double x,
double y,
double z) |
PathNodeType |
getNodeType(BlockView world,
int x,
int y,
int z,
MobEntity mob,
int sizeX,
int sizeY,
int sizeZ,
boolean canOpenDoors,
boolean canEnterOpenDoors) |
private PathNodeType |
getNodeType(MobEntity entity,
BlockPos pos) |
private PathNodeType |
getNodeType(MobEntity entity,
int x,
int y,
int z) |
static PathNodeType |
getNodeTypeFromNeighbors(BlockView blockView,
BlockPos.Mutable mutable,
PathNodeType pathNodeType) |
private PathNode |
getPathNode(int x,
int y,
int z,
int maxYStep,
double prevFeetY,
Direction direction) |
PathNode |
getStart() |
int |
getSuccessors(PathNode[] successors,
PathNode node) |
void |
init(ChunkCache cachedWorld,
MobEntity entity) |
private boolean |
isValidDiagonalSuccessor(PathNode node,
PathNode successor1,
PathNode successor2,
PathNode diagonalSuccessor) |
private static boolean |
method_27138(BlockState blockState) |
private boolean |
method_27139(BlockPos blockPos) |
canEnterOpenDoors, canOpenDoors, canSwim, getNode, method_27137, setCanEnterOpenDoors, setCanOpenDoors, setCanSwim
public void init(ChunkCache cachedWorld, MobEntity entity)
init
in class PathNodeMaker
public void clear()
clear
in class PathNodeMaker
public PathNode getStart()
getStart
in class PathNodeMaker
private boolean method_27139(BlockPos blockPos)
public TargetPathNode getNode(double x, double y, double z)
getNode
in class PathNodeMaker
public int getSuccessors(PathNode[] successors, PathNode node)
getSuccessors
in class PathNodeMaker
private boolean isValidDiagonalSuccessor(PathNode node, @Nullable PathNode successor1, @Nullable PathNode successor2, @Nullable PathNode diagonalSuccessor)
@Nullable private PathNode getPathNode(int x, int y, int z, int maxYStep, double prevFeetY, Direction direction)
public PathNodeType getNodeType(BlockView world, int x, int y, int z, MobEntity mob, int sizeX, int sizeY, int sizeZ, boolean canOpenDoors, boolean canEnterOpenDoors)
getNodeType
in class PathNodeMaker
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)
protected PathNodeType adjustNodeType(BlockView world, boolean canOpenDoors, boolean canEnterOpenDoors, BlockPos pos, PathNodeType type)
private PathNodeType getNodeType(MobEntity entity, BlockPos pos)
private PathNodeType getNodeType(MobEntity entity, int x, int y, int z)
public PathNodeType getDefaultNodeType(BlockView world, int x, int y, int z)
getDefaultNodeType
in class PathNodeMaker
public static PathNodeType getLandNodeType(BlockView blockView, BlockPos.Mutable mutable)
public static PathNodeType getNodeTypeFromNeighbors(BlockView blockView, BlockPos.Mutable mutable, PathNodeType pathNodeType)
protected static PathNodeType getCommonNodeType(BlockView blockView, BlockPos blockPos)
private static boolean method_27138(BlockState blockState)