Last active
February 20, 2021 00:51
-
-
Save OxideWaveLength/a42b612c6d036ebe486c604340cfe175 to your computer and use it in GitHub Desktop.
This is a basic autoclicker for my baseclient
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AutoClicker extends Module { | |
public AutoClicker() { | |
super("AutoClicker", "This is an autoclicker", 0, Category.COMBAT, AntiCheat.VANILLA); | |
} | |
@Overerride | |
public void setup() { | |
moduleSettings.addDefault("cps", 13); | |
} | |
@Override | |
public void onUpdate(UpdateEvent event) { | |
if(!(timer.delay(1000 / moduleSettings.getInt("cps"))) // Limit the CPS. You can use Random to add some random (or use noise to make it smooth) | |
return; | |
// You should also be able to replace this with Minecraft.gameSettings.keyBindAttack.isPressed() or something like that. | |
// The difference between Mouse.isButtonDown and that method is that with keyBindAttack the key could be bound to anything and it would still work | |
if(Mouse.isButtonDown(0)) { | |
mc.clickMouse(); | |
mc.leftClickCounter = 0; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please, bare in mind that this piece of code does not contain a package declaration nor imports.