1
0
forked from Clones/Controlify

remove vanilla override from jump

This commit is contained in:
isXander
2023-04-05 21:41:44 +01:00
parent f0aab6830b
commit ca56271c6e
2 changed files with 4 additions and 2 deletions

View File

@ -114,7 +114,6 @@ public class ControllerBindings<T extends ControllerState> {
.identifier("controlify", "jump")
.defaultBind(GamepadBinds.A_BUTTON)
.category(MOVEMENT_CATEGORY)
.vanillaOverride(options.keyJump, () -> false)
.build());
register(SPRINT = ControllerBindingBuilder.create(controller)
.identifier("controlify", "sprint")

View File

@ -50,7 +50,10 @@ public class ControllerPlayerMovement extends Input {
this.forwardImpulse *= f;
}
this.jumping = bindings.JUMP.held();
if (!this.jumping && bindings.JUMP.justPressed())
this.jumping = true;
else
this.jumping = bindings.JUMP.held();
if (player.getAbilities().flying || player.isInWater() || !controller.config().toggleSneak) {
this.shiftKeyDown = bindings.SNEAK.held();