MWall541 / Dragon-Mounts-Legacy

Github Repository for the Dragon Mounts: Legacy Minecraft Mod. Please Report any issues here!
GNU General Public License v3.0
38 stars 36 forks source link

[Suggestion] Cancel flight when swimming as a non-water dragon #169

Closed MarioSMB closed 7 months ago

MarioSMB commented 1 year ago

I'm not entirely sure why one would pick a water dragon currently as regular dragons are able to fly just fine underwater!

It may play better to make dragons leave their flying state and instead attempt to walk/swim slowly while in the water. Jumping from the surface would allow flying out of the water to prevent getting stuck out in the ocean.

AnimalsWritingCode commented 1 year ago

Yeah in 0cccf07d59e130ec323dd1dff32b090ba9b0a188 it looks like the separated logic for starting flight vs continuing flight makes it so dragons don't stop flying if they hit water.

From what I see on 1.18 they do still prioritize swimming/floating over following and kick off their riders though. If you're seeing something different, let me know the version you're on so I can test and maybe fix.

I would put back the flight cancel, but I actually noticed a bug that causes the dragon's ai to bug out until they next touch ground if I do. Since that's an actual bug, I'm going to hold off. If I can find an easy fix I will put it together, but no promises since the whole ai is going to be rewritten anyways and I'd rather support kay9 with that.

I think this is a good candidate for a feature as part of that larger ai overhaul. I think it was already planned to only allow water dragons to swim underwater and force all other breeds to float to the surface as part of that.

MWall541 commented 7 months ago

This issue will be a "crossover" of the AI overhaul as well as a swimming feature I have planned. Stay tuned.