Apotheosis

Apotheosis

70M Downloads

[Bug] [1.20.1-7.0.5] Charm of flight causes player to stop flying before refreshing

ForgedSnow opened this issue ยท 5 comments

commented

Created a charm of flight (8:00) and forces me out of flight every time the timer reaches zero before refreshing the effect.

commented

I also run into this with a different path.
If I try to extend the time I can fly by drinking another Potion of Flying it resets the timer but also cancels the flight.

While not that big of a deal I also realized that if you get the flying effect on you before or while you are in creative, when you exit it it doesn't just cancels the flight you cannot fly again until you drink another potion or go back to creative.

commented

The issue lies in how potions do attribute changes; reapplying a potion actually causes all attribute changes to be removed and then re-added instead of just not removing them.

commented

I just built and tested this PR but it didn't work for me.
But I see, that's unfortunate.

commented

Yeah there's a twofold change that has to be made here. The way attributes work with potions has to be adjusted to not remove the attribute on re-application, and flight also needs to go into the "extended duration" category so it can't potentially hit zero on the client before reapplication.

commented

Yep, fix works fine for me once I also added the flying effect to the config.