Synaps3 The problem is that creating a path in a non-protected region any player could dismantle the road or mobs could damage them. That is the issue, there is no issue have a path in a protected region.
If you have people who will grief your roads, isn't that a protection problem, not a mob travel problem? I wouldnt overload this plugin with that kind of thing and anyway there are plenty of workarounds: Lock the waypoints with LWC for example. Or, only use the signs to mark the locations, after which they are saved in the plugin on the server, not as signs that stay. Honestly I would leave grief prevention to the locking/protection plugins and not try to do their job as well.
would it be possible to just always have the pig on the highest block in it's path? It would make for some choppy riding, what with the pig hopping up trees/buildings but he could go straight from A to B and would eliminate the need for setting multiple points along the path.
Why has no one responded back on this? :O I know this is possible, but does anyone like/dislike it? I think this would be the best way to do it... You could define your path without any issues of people destroying it, and the movement would be just fine...
Well I took a look at the DragonTravel code. I think I might be capable of creating this plugin. It will take me a bit longer than usual, but I think I'm up for the challenge. I will go with np's idea of having the user set waypoints. I hope I can do it!
I think you didn't get the problem... Of course you can let users set waypoints, for me that was self-understanding, but what is destroyed is the way BETWEEN the waypoints and the pig will simply run along the path, even if someone dig a huge hole or whatever, the pig would simply start flying instead of walking along on the ground...
Would you guys mind if I waited until 1.3 and bukkit for 1.3 is released before I start working on this? I am just afraid that by the time I'm done with this minecraft 1.3 will be out, and then I have to fix the code. Also, I'm pretty busy this week anyways.
about the pathfinding, i have a very easy solution... it does sound boring tho just make a path and fence it off, in that way the pig has only 1 way to go, a human made one
Code: //Entity is the pig entity //You'll also need to divide the path's goal, because the AI can't reach further then certain distances. trueOrFalse = false; while(trueOrFalse = true){ if(entity instanceof Pig){ EntityCreature creature = ((CraftCreature)((Pig)entity)).getHandle(); Navigation navigation = creature.getNavigation(); navigation.a(/*The location's X*/, /*The location's Y*/, /*The location's Z*/, /*The speed, 0.3F looks good*/); } Bukkit.getServer().getScheduler().scheduleAsyncDelayedThread(this, new Runnable() ){ public void run(){ trueOrFalse = true; }, 2000L); } }
WarmakerT You can use reflection and change the default maximun distance from 16 to something like 200, and then you don't need to split the path into multiple points.
I would so use this on my server. I personally don't like dragon travel just because dragons are too big and bulky