Grappling Hook Mod

Grappling Hook Mod

19M Downloads

[BUG] Unable to start flying while wearing double jump boots

MaliciousFiles opened this issue ยท 0 comments

commented

Describe the bug
If you're wearing boots enchanted with double jump, it takes precedence over being able to fly, including in creative.

Version
Tested in 1.16.5-v12 (Create: Above and Beyond), but applicable to all versions.

To Reproduce
If you can, steps to reproduce the behavior, e.g.:

  1. Go into creative
  2. Equip boots with double jump
  3. Try to start flying

ClientControllerManager#wearingDoubleJumpEnchant only checks whether PlayerAbilities.isFlying, so if you're already flying it won't double jump out of it, but it doesn't check PlayerAbilities.allowFlying, which means you can't start flying. Usually it doesn't matter in creative, but if using a mod that allows flying in survival it is annoying.

I made a quick mod that uses mixins to fix it, adding a keybind to toggle: https://github.com/MaliciousFiles/grapplemod-fix.