Dragon Mounts: Legacy

Dragon Mounts: Legacy

15M Downloads

Dragon AI Issues

Peekofwar opened this issue · 5 comments

commented

I've noticed that my custom dragon breed doesn't walk towards me when I move away from him. He'll still teleport to me when I get too far, but he won't walk on his own.

commented

All dragons have trouble following right now. They are all due for an AI overhaul. Thus the I havent made a “release” build of the mod yet haha! Thanks for reporting 👍

commented

I was able to test this and it looks like the follow breaks as soon as a dragon starts flying. This is happening for all the dragons in 1.19.2 and 1.18.2.

If you comment out lines 301 and 302 in TameableDragon, the ground follow stops breaking. Unsurprisingly, flying follow still doesn't work.

commented

So I'm thinking this is an issue in the FollowOwnerGoal. It saves the PathNavigation into a variable and uses that instead of calling getNavigation(). So when a new one is created it isn't updating the one used by the goal. It's private and final, so no updating it to fix.

I'm thinking the easiest solution is a DragonPathNavigation delegate class that wraps a GroundPathNavigation and FlyingPathNavigation and passes any calls through to them so the underlying PathNavigation can be updated even if the one in the goal can't be.

commented

Overall, dragons have serious AI issues currently and are due for an overhaul. Thus the mods state being in beta. This is the current project on my to-do list :)

commented

Going to merge this into #83