public abstract class PathNavigate
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected Path |
currentPath
The PathEntity being followed.
|
protected NodeProcessor |
nodeProcessor |
protected double |
speed |
protected EntityLiving |
theEntity |
protected World |
world |
Constructor and Description |
---|
PathNavigate(EntityLiving entitylivingIn,
World worldIn) |
Modifier and Type | Method and Description |
---|---|
boolean |
canEntityStandOnPos(BlockPos pos) |
protected abstract boolean |
canNavigate()
If on ground or swimming and can swim
|
boolean |
canUpdatePathOnTimeout()
Returns true if path can be changed by
onUpdateNavigation() |
protected void |
checkForStuck(Vec3d positionVec3)
Checks if entity haven't been moved when last checked and if so, clears current
net.minecraft.pathfinding.PathEntity |
void |
clearPathEntity()
sets active PathEntity to null
|
protected abstract Vec3d |
getEntityPosition() |
NodeProcessor |
getNodeProcessor() |
Path |
getPath()
gets the actively used PathEntity
|
protected abstract PathFinder |
getPathFinder() |
float |
getPathSearchRange()
Gets the maximum distance that the path finding will search in.
|
Path |
getPathToEntityLiving(Entity entityIn)
Returns the path to the given EntityLiving.
|
Path |
getPathToPos(BlockPos pos)
Returns path to given BlockPos
|
Path |
getPathToXYZ(double x,
double y,
double z)
Returns the path to the given coordinates.
|
protected abstract boolean |
isDirectPathBetweenPoints(Vec3d posVec31,
Vec3d posVec32,
int sizeX,
int sizeY,
int sizeZ)
Checks if the specified entity can safely walk to the specified location.
|
protected boolean |
isInLiquid()
Returns true if the entity is in water or lava, false otherwise
|
boolean |
noPath()
If null path or reached the end
|
void |
onUpdateNavigation() |
protected void |
pathFollow() |
protected void |
removeSunnyPath()
Trims path data from the end to the first sun covered block
|
boolean |
setPath(Path pathentityIn,
double speedIn)
Sets a new path.
|
void |
setSpeed(double speedIn)
Sets the speed
|
boolean |
tryMoveToEntityLiving(Entity entityIn,
double speedIn)
Try to find and set a path to EntityLiving.
|
boolean |
tryMoveToXYZ(double x,
double y,
double z,
double speedIn)
Try to find and set a path to XYZ.
|
void |
updatePath() |
protected EntityLiving theEntity
protected World world
protected Path currentPath
protected double speed
protected NodeProcessor nodeProcessor
public PathNavigate(EntityLiving entitylivingIn, World worldIn)
protected abstract PathFinder getPathFinder()
public void setSpeed(double speedIn)
public float getPathSearchRange()
public boolean canUpdatePathOnTimeout()
onUpdateNavigation()
public void updatePath()
public final Path getPathToXYZ(double x, double y, double z)
public Path getPathToEntityLiving(Entity entityIn)
public boolean tryMoveToXYZ(double x, double y, double z, double speedIn)
public boolean tryMoveToEntityLiving(Entity entityIn, double speedIn)
public boolean setPath(Path pathentityIn, double speedIn)
public Path getPath()
public void onUpdateNavigation()
protected void pathFollow()
protected void checkForStuck(Vec3d positionVec3)
net.minecraft.pathfinding.PathEntity
public boolean noPath()
public void clearPathEntity()
protected abstract Vec3d getEntityPosition()
protected abstract boolean canNavigate()
protected boolean isInLiquid()
protected void removeSunnyPath()
protected abstract boolean isDirectPathBetweenPoints(Vec3d posVec31, Vec3d posVec32, int sizeX, int sizeY, int sizeZ)
public boolean canEntityStandOnPos(BlockPos pos)
public NodeProcessor getNodeProcessor()