public class MobNavigation extends EntityNavigation
Modifier and Type | Field and Description |
---|---|
private boolean |
avoidSunlight |
currentNodeMs, currentNodeTimeout, currentPath, entity, lastActiveTickMs, lastNodePosition, lastRecalculateTime, nodeMaker, nodeReachProximity, pathStartPos, pathStartTime, shouldRecalculate, speed, tickCount, world
Constructor and Description |
---|
MobNavigation(MobEntity mob,
World world) |
Modifier and Type | Method and Description |
---|---|
protected void |
adjustPath()
Adjusts the current path according to various special obstacles that may be in the way, for example sunlight
|
private boolean |
allVisibleArePassable(int x,
int y,
int z,
int xSize,
int ySize,
int zSize,
Vec3d entityPos,
double lookVecX,
double lookVecZ)
Checks whether all blocks in the box which are visible (in front of) the mob can be pathed through
|
private boolean |
allVisibleAreSafe(int centerX,
int centerY,
int centerZ,
int xSize,
int ySize,
int zSize,
Vec3d entityPos,
double lookVecX,
double lookVecZ) |
boolean |
canEnterOpenDoors() |
protected boolean |
canPathDirectlyThrough(Vec3d origin,
Vec3d target,
int sizeX,
int sizeY,
int sizeZ) |
protected boolean |
canWalkOnPath(PathNodeType pathType) |
protected PathNodeNavigator |
createPathNodeNavigator(int range) |
Path |
findPathTo(BlockPos target,
int distance) |
Path |
findPathTo(Entity entity,
int distance) |
private int |
getPathfindingY()
The y-position to act as if the entity is at for pathfinding purposes
|
protected Vec3d |
getPos()
The position to act as if the entity is at for pathfinding purposes
|
protected boolean |
isAtValidPosition() |
void |
setAvoidSunlight(boolean avoidSunlight) |
void |
setCanPathThroughDoors(boolean canPathThroughDoors) |
canSwim, checkTimeouts, continueFollowingPath, findPathTo, findPathToAny, findPathToAny, getCurrentPath, getNodeMaker, getTargetPos, isFollowingPath, isIdle, isInLiquid, isNearPathStartPos, isValidPosition, method_29934, onBlockChanged, recalculatePath, resetRangeMultiplier, setCanSwim, setRangeMultiplier, setSpeed, shouldRecalculatePath, startMovingAlong, startMovingTo, startMovingTo, stop, tick
protected PathNodeNavigator createPathNodeNavigator(int range)
createPathNodeNavigator
in class EntityNavigation
protected boolean isAtValidPosition()
isAtValidPosition
in class EntityNavigation
protected Vec3d getPos()
getPos
in class EntityNavigation
public Path findPathTo(BlockPos target, int distance)
findPathTo
in class EntityNavigation
public Path findPathTo(Entity entity, int distance)
findPathTo
in class EntityNavigation
private int getPathfindingY()
protected void adjustPath()
adjustPath
in class EntityNavigation
protected boolean canPathDirectlyThrough(Vec3d origin, Vec3d target, int sizeX, int sizeY, int sizeZ)
canPathDirectlyThrough
in class EntityNavigation
private boolean allVisibleAreSafe(int centerX, int centerY, int centerZ, int xSize, int ySize, int zSize, Vec3d entityPos, double lookVecX, double lookVecZ)
protected boolean canWalkOnPath(PathNodeType pathType)
private boolean allVisibleArePassable(int x, int y, int z, int xSize, int ySize, int zSize, Vec3d entityPos, double lookVecX, double lookVecZ)
public void setCanPathThroughDoors(boolean canPathThroughDoors)
public boolean canEnterOpenDoors()
public void setAvoidSunlight(boolean avoidSunlight)