#(masecla22) Issues with Citizens API
64 messages · Page 1 of 1 (latest)
(masecla22) Issues with Citizens API
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.
You can block this bot if you don't want to see these messages, I won't mind.
<@&525394568410038282>
This here is my stuck action
validateSpawnLocation finds a correct spawn location
moveTo teleports the NPC
But I end up with this
declaration: package: net.citizensnpcs.api.ai, interface: StuckAction
you need to return true if you want to continue navigation
cancelNavigation shouldn't be called again
@stray matrix
Yeah I want to cancel the navigation
I've tried returning true,
I've tried returning false
I've tried not calling cancelNavigation
If I return true, I get this NPE
And if i return true without cancelling it, it still hangs in a loop
@stray matrix what's the rest of the code look like? TeleportStuckAction (the default one) is similar, and has no issue so must be somewhere else
So the spawn location thing
Is this,
I'm using it to slightly vary the spawn location everytime the NPC gets stuck,
Since no NPE's are showing up, it seems like the location is not null
I mean the setTarget call
I never set navigation,
It's invoked by BlockBreaker
I also modified some of the BlockBreaker methods so I could intercept them
Though this should not cause an issue
I added it so I could move the NPC closer
And I still use the Citizens method
what is moveTo
ok so it doesn't teleport?
No,
It simply gets stuck in place and calls stuckAction 100 times (after which I despawn it)
Let me see
Still seems to call repeatedly
Weird thing is, isNavigating is returning false
does it teleport
It now seems to have teleported
But I don't see why stuckAction would be called when navigator.isNavigating returns false
if it can't find a path that is also stuck
But wouldn't isNavigating return true?
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.)
@stray matrix