Skip to content

Commit

Permalink
Add "Jump while sneaking" checkbox to Parkour
Browse files Browse the repository at this point in the history
Fixes #456
  • Loading branch information
Alexander01998 committed Dec 29, 2023
1 parent 52376d1 commit 229fa8d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/main/java/net/wurstclient/hacks/ParkourHack.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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
Expand All @@ -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();
Expand Down

0 comments on commit 229fa8d

Please sign in to comment.