#(API) NPC Navigation (increasing vectors)

18 messages · Page 1 of 1 (latest)

noble tulipBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

rustic lantern
#

so e.g, if

final Iterable<Vector> vectors = npc.getNavigator().getPathStrategy().getPath();

returned me a list of 10 positions, I'd instead want 40 more detailed positions

faint nebulaBOT
#

@rustic lantern

Thread Close Blocked

Thread was closed either automatically by timeout or by the Discord manual close button. If closing was intentional, please use </resolved:1028673926114594866> or </invalid:1028673926898909185>.

#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@rustic lantern

rustic lantern
#

I did resolve this but I did want to ask whether it's possible to get the navigation path that an NPC would take before they actually start navigating

#

like I want to get the result of "canNavigateTo" as vectors instead of a boolean

light galleon
#

You can get the path as a list of vectors through navigator api

#

See the Java doc

faint nebulaBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@rustic lantern

rustic lantern
#
                npc.getNavigator().setTarget(entity.getLocation());
                final Iterable<Vector> vectors = npc.getNavigator().getPathStrategy().getPath();
                npc.getNavigator().cancelNavigation();```

I did a system like this earlier, is that the method you were referring to?
rustic lantern
#

ideally wouldn't want the NPC trying to run to a certain area for a second and then it cancels

rustic lantern
#

Resolved!