From 229fa8dbd8536f9c36452e017ef3e6ccdde6c4a1 Mon Sep 17 00:00:00 2001 From: Alexander01998 Date: Fri, 29 Dec 2023 01:17:19 +0100 Subject: [PATCH] Add "Jump while sneaking" checkbox to Parkour Fixes #456 --- src/main/java/net/wurstclient/hacks/ParkourHack.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/wurstclient/hacks/ParkourHack.java b/src/main/java/net/wurstclient/hacks/ParkourHack.java index c5cfb79292..60198f4e95 100644 --- a/src/main/java/net/wurstclient/hacks/ParkourHack.java +++ b/src/main/java/net/wurstclient/hacks/ParkourHack.java @@ -11,6 +11,7 @@ import net.wurstclient.Category; import net.wurstclient.events.UpdateListener; import net.wurstclient.hack.Hack; +import net.wurstclient.settings.CheckboxSetting; import net.wurstclient.settings.SliderSetting; import net.wurstclient.settings.SliderSetting.ValueDisplay; @@ -27,12 +28,20 @@ public final class ParkourHack extends Hack implements UpdateListener "How close Parkour will let you get to the edge before jumping.", 0.001, 0.001, 0.25, 0.001, ValueDisplay.DECIMAL.withSuffix("m")); + private final CheckboxSetting sneak = new CheckboxSetting( + "Jump while sneaking", + "Keeps Parkour active even while you are sneaking.\n" + + "You may want to increase the \u00a7lEdge \u00a7ldistance\u00a7r" + + " slider when using this option.", + false); + public ParkourHack() { super("Parkour"); setCategory(Category.MOVEMENT); addSetting(minDepth); addSetting(edgeDistance); + addSetting(sneak); } @Override @@ -54,7 +63,8 @@ public void onUpdate() if(!MC.player.isOnGround() || MC.options.jumpKey.isPressed()) return; - if(MC.player.isSneaking() || MC.options.sneakKey.isPressed()) + if(!sneak.isChecked() + && (MC.player.isSneaking() || MC.options.sneakKey.isPressed())) return; Box box = MC.player.getBoundingBox();