Issue is present in Citizens version: Citizens version 2.0.27-SNAPSHOT (build 2186) and Citizens version 2.0.27-SNAPSHOT (build 2188), but not in Citizens version 2.0.27-SNAPSHOT (build 2185).
Testing with Spigot version: This server is running CraftBukkit version git-Spigot-a19903d-e1ebdd9 (MC: 1.16.4) (Implementing API version 1.16.4-R0.1-SNAPSHOT), but has also been reported by Sentinel users with with This server is running Tuinity version git-Tuinity-"8056d13" (MC: 1.16.4) (Implementing API version 1.16.4-R0.1-SNAPSHOT)
Problem: Any path with a distance more than a few blocks fails to complete. Only very short (5 block or less) paths still function.
This has been noticed originally with Sentinel NPCs that will not move towards a target to attack it until that target is very very close to the NPC, but can has been replicated with Citizens alone using the /npc pathto command.
When testing pathto, I notice the NPC twitches forward slightly before stopping and giving up. With Sentinel, no twitch was observed.
Versions and background:
Issue is present in Citizens version:
Citizens version 2.0.27-SNAPSHOT (build 2186)
andCitizens version 2.0.27-SNAPSHOT (build 2188)
, but not inCitizens version 2.0.27-SNAPSHOT (build 2185)
.Testing with Spigot version:
This server is running CraftBukkit version git-Spigot-a19903d-e1ebdd9 (MC: 1.16.4) (Implementing API version 1.16.4-R0.1-SNAPSHOT)
, but has also been reported by Sentinel users with withThis server is running Tuinity version git-Tuinity-"8056d13" (MC: 1.16.4) (Implementing API version 1.16.4-R0.1-SNAPSHOT)
Based on a Sentinel issue report @ https://github.com/mcmonkeyprojects/Sentinel/issues/355 and one on Discord, but tested myself to verify and gather details.
Problem: Any path with a distance more than a few blocks fails to complete. Only very short (5 block or less) paths still function.
This has been noticed originally with Sentinel NPCs that will not move towards a target to attack it until that target is very very close to the NPC, but can has been replicated with Citizens alone using the
/npc pathto
command.When testing
pathto
, I notice the NPC twitches forward slightly before stopping and giving up. With Sentinel, no twitch was observed.Cause tracing:
This commit: https://github.com/CitizensDev/Citizens2/commit/810441c17b127ea3cbfd69fe900c7d691f9b6433 breaks pathfinding. I believe the cause is that the new
setPath
method never sets the path to thefallback
field.