Budschie / BudschieMorphMod

This is a port of the morph mod to forge 1.16.5
MIT License
11 stars 9 forks source link

Cannot fly as a bat in LAN server mode #50

Closed UAVXP closed 2 years ago

UAVXP commented 2 years ago

My friend has created a map, opened it to LAN (with cheats enabled). As I tried to kill a bat and collecting it's soul, it was okay. But then I opened an UI, switched to a bat (nightvision and lower camera position are working) - but then I could not fly as I did in Metamorph. I even tried to press an ability key (for me it's Z) many times, but it didn't worked.

UAVXP commented 2 years ago

I have a suspicion that you forgot to add some kind of calling the base class' enableAbility method in https://github.com/Budschie/BudschieMorphMod/blob/93582f8de80fd65c961c175f7657f943687b27fa/src/main/java/de/budschie/bmorph/morph/functionality/configurable/FlyAbility.java#L24 Like you did here: https://github.com/Budschie/BudschieMorphMod/blob/93582f8de80fd65c961c175f7657f943687b27fa/src/main/java/de/budschie/bmorph/morph/functionality/configurable/GuardianAbility.java#L285

I'm not too good into Java, but I suppose you should call super.enableAbility(player, enabledItem);, because in the base method the trackedPlayers list got updated with a player used this ability: https://github.com/Budschie/BudschieMorphMod/blob/93582f8de80fd65c961c175f7657f943687b27fa/src/main/java/de/budschie/bmorph/morph/functionality/AbstractEventAbility.java#L23 And since you're overriding that method - the base one (I think) not being called.

Budschie commented 2 years ago

Yep. That should be the cause of this problem.

Budschie commented 2 years ago

I'm gonna merge this PR once I have time to do it.

Budschie commented 2 years ago

Also, thanks for contributing code to this project :)

UAVXP commented 2 years ago

And thank you for the mod and the support of it)