public class Path extends Object
Modifier and Type | Field and Description |
---|---|
private int |
currentNodeIndex |
private Set<TargetPathNode> |
field_20300 |
private PathNode[] |
field_55 |
private PathNode[] |
field_57 |
private float |
manhattanDistanceFromTarget |
private List<PathNode> |
nodes |
private boolean |
reachesTarget |
private BlockPos |
target |
Constructor and Description |
---|
Path(List<PathNode> nodes,
BlockPos target,
boolean reachesTarget) |
Modifier and Type | Method and Description |
---|---|
boolean |
equalsPath(Path path) |
static Path |
fromBuffer(PacketByteBuf buffer) |
int |
getCurrentNodeIndex() |
Vec3i |
getCurrentPosition() |
PathNode |
getEnd() |
int |
getLength() |
float |
getManhattanDistanceFromTarget() |
PathNode |
getNode(int index) |
Vec3d |
getNodePosition(Entity entity) |
Vec3d |
getNodePosition(Entity entity,
int index) |
List<PathNode> |
getNodes() |
BlockPos |
getTarget() |
boolean |
isFinished() |
PathNode[] |
method_22880() |
PathNode[] |
method_22881() |
void |
next() |
boolean |
reachesTarget() |
void |
setCurrentNodeIndex(int index) |
void |
setLength(int length) |
void |
setNode(int index,
PathNode node) |
String |
toString() |
private PathNode[] field_57
private PathNode[] field_55
@Environment(value=CLIENT) private Set<TargetPathNode> field_20300
private int currentNodeIndex
private final BlockPos target
private final float manhattanDistanceFromTarget
private final boolean reachesTarget
public void next()
public boolean isFinished()
public PathNode getNode(int index)
public void setLength(int length)
public void setNode(int index, PathNode node)
public int getLength()
public int getCurrentNodeIndex()
public void setCurrentNodeIndex(int index)
public Vec3i getCurrentPosition()
public boolean reachesTarget()
@Environment(value=CLIENT) public PathNode[] method_22880()
@Environment(value=CLIENT) public PathNode[] method_22881()
@Environment(value=CLIENT) public static Path fromBuffer(PacketByteBuf buffer)
public BlockPos getTarget()
public float getManhattanDistanceFromTarget()