MWall541 / Dragon-Mounts-Legacy

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

Fix 184 - Cache owner in DragonFollowOwnerGoal #185

Closed AnimalsWritingCode closed 1 year ago

AnimalsWritingCode commented 1 year ago

This PR fixes a crash when a dragon's owner is on a different level/dimension than the dragon so getOwner returns null. It just matches the vanilla behavior of caching the owner.

❗ This bug is in all 1.1.5 versions, so it will need to be merged into 1.19 and 1.20. The conflicts into 1.20 are from a difference in using this to access the instance vars. I'll happily put up a PR for it if you want, but I'll need to cherry-pick this commit or include the other commit in master.

Honestly, I don't know what possessed me to change the implementation from vanilla in the first place. Sorry for the crash 🙇‍♀️

Fixes #184 Fixed #189

MWall541 commented 1 year ago

No worries! Thanks for looking into it and getting it fixed up. I appreciate the help as always!