public class WalkNodeProcessor extends NodeProcessor
| Modifier and Type | Field and Description |
|---|---|
private boolean |
avoidsWater |
private boolean |
canBreakDoors |
private boolean |
canEnterDoors |
private boolean |
canSwim |
private boolean |
shouldAvoidWater |
blockaccess, entitySizeX, entitySizeY, entitySizeZ, pointMap| Constructor and Description |
|---|
WalkNodeProcessor() |
| Modifier and Type | Method and Description |
|---|---|
int |
findPathOptions(PathPoint[] pathOptions,
Entity entityIn,
PathPoint currentPoint,
PathPoint targetPoint,
float maxDistance) |
static int |
func_176170_a(IBlockAccess blockaccessIn,
Entity entityIn,
int x,
int y,
int z,
int sizeX,
int sizeY,
int sizeZ,
boolean avoidWater,
boolean breakDoors,
boolean enterDoors) |
boolean |
getAvoidsWater() |
boolean |
getCanSwim() |
boolean |
getEnterDoors() |
PathPoint |
getPathPointTo(Entity entityIn)
Returns given entity's position as PathPoint
|
PathPoint |
getPathPointToCoords(Entity entityIn,
double x,
double y,
double target)
Returns PathPoint for given coordinates
|
private PathPoint |
getSafePoint(Entity entityIn,
int x,
int y,
int z,
int p_176171_5_)
Returns a point that the entity can safely move to
|
private int |
getVerticalOffset(Entity entityIn,
int x,
int y,
int z)
Checks if an entity collides with blocks at a position.
|
void |
initProcessor(IBlockAccess iblockaccessIn,
Entity entityIn) |
void |
postProcess()
This method is called when all nodes have been processed and PathEntity is created.
|
void |
setAvoidsWater(boolean avoidsWaterIn) |
void |
setBreakDoors(boolean canBreakDoorsIn) |
void |
setCanSwim(boolean canSwimIn) |
void |
setEnterDoors(boolean canEnterDoorsIn) |
openPointprivate boolean canEnterDoors
private boolean canBreakDoors
private boolean avoidsWater
private boolean canSwim
private boolean shouldAvoidWater
public void initProcessor(IBlockAccess iblockaccessIn, Entity entityIn)
initProcessor in class NodeProcessorpublic void postProcess()
WalkNodeProcessor uses this to change its field avoidsWaterpostProcess in class NodeProcessorpublic PathPoint getPathPointTo(Entity entityIn)
getPathPointTo in class NodeProcessorpublic PathPoint getPathPointToCoords(Entity entityIn, double x, double y, double target)
getPathPointToCoords in class NodeProcessorpublic int findPathOptions(PathPoint[] pathOptions, Entity entityIn, PathPoint currentPoint, PathPoint targetPoint, float maxDistance)
findPathOptions in class NodeProcessorprivate PathPoint getSafePoint(Entity entityIn, int x, int y, int z, int p_176171_5_)
private int getVerticalOffset(Entity entityIn, int x, int y, int z)
public static int func_176170_a(IBlockAccess blockaccessIn, Entity entityIn, int x, int y, int z, int sizeX, int sizeY, int sizeZ, boolean avoidWater, boolean breakDoors, boolean enterDoors)
public void setEnterDoors(boolean canEnterDoorsIn)
public void setBreakDoors(boolean canBreakDoorsIn)
public void setAvoidsWater(boolean avoidsWaterIn)
public void setCanSwim(boolean canSwimIn)
public boolean getEnterDoors()
public boolean getCanSwim()
public boolean getAvoidsWater()