Skip to content

Commit bb2337f

Browse files
committed
Add unsprint in water setting to sprint module
1 parent 0ee66e8 commit bb2337f

File tree

1 file changed

+9
-0
lines changed
  • src/main/java/meteordevelopment/meteorclient/systems/modules/movement

1 file changed

+9
-0
lines changed

src/main/java/meteordevelopment/meteorclient/systems/modules/movement/Sprint.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,13 @@ public enum Mode {
5757
.build()
5858
);
5959

60+
private final Setting<Boolean> unsprintInWater = sgGeneral.add(new BoolSetting.Builder()
61+
.name("unsprint-in-water")
62+
.description("Whether to stop sprinting when in water.")
63+
.defaultValue(true)
64+
.build()
65+
);
66+
6067
public Sprint() {
6168
super(Categories.Movement, "sprint", "Automatically sprints.");
6269
}
@@ -91,6 +98,8 @@ private void onPacketSent(PacketEvent.Sent event) {
9198
}
9299

93100
public boolean shouldSprint() {
101+
if (unsprintInWater.get() && (mc.player.isTouchingWater() || mc.player.isSubmergedInWater())) return false;
102+
94103
boolean strictSprint = mc.player.forwardSpeed > 1.0E-5F
95104
&& ((ClientPlayerEntityAccessor) mc.player).invokeCanSprint()
96105
&& (!mc.player.horizontalCollision || mc.player.collidedSoftly)

0 commit comments

Comments
 (0)