Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import java.util.List;
import java.util.Random;
private int jumpCooldown = 0;

public class AntiAFK extends Module {
private final SettingGroup sgActions = settings.createGroup("Actions");
Expand Down Expand Up @@ -176,12 +177,23 @@ public void onDeactivate() {
@EventHandler
private void onTick(TickEvent.Pre event) {
if (!Utils.canUpdate()) return;

// Jump
if (jump.get()) {
if (mc.options.keyJump.isDown()) mc.options.keyJump.setDown(false);
else if (random.nextInt(99) == 0) mc.options.keyJump.setDown(true);
if (jumpCooldown > 0) {
jumpCooldown--;
}
else {
if (mc.options.keyJump.isDown()) {
mc.options.keyJump.setDown(false);
}
else if (random.nextInt(99) == 0) {
mc.options.keyJump.setDown(true);
jumpCooldown = 20;
}
}
}


// Swing
if (swing.get() && random.nextInt(99) == 0) {
Expand Down