Minecraft NPC Paths

minecraft-commandsminecraft-java-edition

I am using Dragnoz's NPC Paths:

But if I have two paths run along each other, the villagers will occasionally push each other off, or if it becomes night time or there is a zombie, the villager will try to run away, off the path. Is there anyway around this? I would rather not use NoAI:1 unless I have to. Any help would be appreciated.

Best Answer

Something that is not readily apparent given your question is why you want your Villagers not to be afraid of Zombies. If they're not afraid, they'll just die; but I assume you don't care because you're trying to create some sort of escort quest.

Using the downward Motion should cause the Villagers to be "unbumpable." I watched this video fairly recently and if you just set the Y value of the Motion array to -0.1 it ought to be okay. If crossing paths is a problem, just do something like

/scoreboard objectives add path1
/scoreboard objectives add path2
// etc.

I don't see any way around NoAI unless you want to do something weird like make them ride an ArmorStand and move that around, which could look awful.