net.minecraft.entity.ai.pathing

public final class Path

net.minecraft.world.level.pathfinder.Path
net.minecraft.class_11
net.minecraft.entity.ai.pathing.Path

Field summary

Modifier and TypeField
public static final PacketCodec<PacketByteBuf, Path>
STREAM_CODEC
field_62922
PACKET_CODEC
private final List<PathNode>
nodes
field_52
nodes
private Path$DebugNodeInfo
debugData
field_45155
debugNodeInfos
private int
nextNodeIndex
field_54
currentNodeIndex
private final BlockPos
target
field_20301
target
private final float
distToTarget
field_20302
manhattanDistanceFromTarget
private final boolean
reached
field_20303
reachesTarget

Constructor summary

ModifierConstructor
public (List<PathNode> nodes, BlockPos target, boolean reachesTarget)

Method summary

Modifier and TypeMethod
public void
advance()
method_44()
next()
public boolean
notStarted()
method_30849()
isStart()
public boolean
isDone()
method_46()
isFinished()
public PathNode
getEndNode()
method_45()
getEnd()
public PathNode
getNode(int i)
method_40(int arg0)
getNode(int index)
public void
truncateNodes(int index)
method_36(int arg0)
setLength(int length)
public void
replaceNode(int index, Node replaceWith)
method_33(int arg0, class_9 arg1)
setNode(int index, PathNode node)
public int
getNodeCount()
method_38()
getLength()
public int
getNextNodeIndex()
method_39()
getCurrentNodeIndex()
public void
setNextNodeIndex(int nextNodeIndex)
method_42(int arg0)
setCurrentNodeIndex(int nodeIndex)
public Vec3d
getEntityPosAtNode(Entity entity, int index)
method_47(class_1297 arg0, int arg1)
getNodePosition(Entity entity, int index)
public BlockPos
getNodePos(int index)
method_31031(int arg0)
getNodePos(int index)
public Vec3d
getNextEntityPos(Entity entity)
method_49(class_1297 arg0)
getNodePosition(Entity entity)
public BlockPos
getNextNodePos()
method_31032()
getCurrentNodePos()
public PathNode
getNextNode()
method_29301()
getCurrentNode()
public PathNode
getPreviousNode()
method_30850()
getLastNode()
public boolean
sameAs(Path path)
method_41(class_11 arg0)
equalsPath(Path path)
public boolean
canReach()
method_21655()
reachesTarget()
void
setDebug(Node[] openSet, Node[] closedSet, Set<Target> targets)
method_35500(class_9[] arg0, class_9[] arg1, Set<class_4459> arg2)
setDebugInfo(PathNode[] debugNodes, PathNode[] debugSecondNodes, Set<TargetPathNode> debugTargetNodes)
public Path$DebugNodeInfo
debugData()
method_52604()
getDebugNodeInfos()
public void
writeToStream(FriendlyByteBuf buffer)
method_35498(class_2540 arg0)
toBuf(PacketByteBuf buf)
public static Path
createFromStream(FriendlyByteBuf buffer)
method_34(class_2540 arg0)
fromBuf(PacketByteBuf buf)
public BlockPos
getTarget()
method_48()
getTarget()
public float
getDistToTarget()
method_21656()
getManhattanDistanceFromTarget()
private static PathNode[]
readNodeArray(FriendlyByteBuf input)
method_52603(class_2540 arg0)
nodesFromBuf(PacketByteBuf buf)
private static void
writeNodeArray(FriendlyByteBuf output, Node[] nodes)
method_52602(class_2540 arg0, class_9[] arg1)
write(PacketByteBuf buf, PathNode[] nodes)
public Path
copy()
method_52605()
copy()
private static void
lambda$writeToStream$0(FriendlyByteBuf arg0, Node arg1)
method_35499(class_2540 arg0, class_9 arg1)
method_35499(PacketByteBuf buf, PathNode node)
private static void
lambda$static$0(FriendlyByteBuf arg0, Path arg1)
method_74690(class_2540 arg0, class_11 arg1)
method_74690(PacketByteBuf buf, Path path)