Skip to content

Commit

Permalink
Merge pull request #69 from maytrixc/main
Browse files Browse the repository at this point in the history
Added a new module: FasterUse
  • Loading branch information
etianl authored Dec 27, 2024
2 parents f75f93e + 0b5b89e commit 543972f
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/main/java/pwn/noobs/trouserstreak/Trouser.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public void onInitialize() {
Modules.get().add(new AirstrikePlus());
Modules.get().add(new BoomPlus());
Modules.get().add(new ExplosionAura());
Modules.get().add(new FasterUse());

//Modules.get().add(new -----> Exploits for old versions! <-----());
Modules.get().add(new ShulkerDupe());
Expand Down
41 changes: 41 additions & 0 deletions src/main/java/pwn/noobs/trouserstreak/modules/FasterUse.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
package pwn.noobs.trouserstreak.modules;

import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.IntSetting;
import meteordevelopment.meteorclient.settings.Setting;
import meteordevelopment.meteorclient.settings.SettingGroup;
import meteordevelopment.meteorclient.systems.modules.Module;
import meteordevelopment.orbit.EventHandler;
import net.minecraft.util.Hand;
import net.minecraft.util.hit.BlockHitResult;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.Direction;
import pwn.noobs.trouserstreak.Trouser;

public class FasterUse extends Module {
private final SettingGroup sgGeneral = settings.createGroup("Rate");

public FasterUse() {
super(Trouser.Main, "Faster-use", "Fast use but faster... WAY faster (made by maytrixd)");
}

private final Setting<Integer> uses = sgGeneral.add(new IntSetting.Builder()
.name("Times per tick")
.description("Amount of uses each tick")
.defaultValue(5)
.min(1)
.sliderMax(15)
.build()
);

@EventHandler
private void onTick(TickEvent.Pre event) {
for (int i = 0; i < uses.get(); i++) {
if(mc.options.useKey.isPressed()) {
BlockHitResult bhr = new BlockHitResult(mc.player.getEyePos(), Direction.DOWN, BlockPos.ofFloored(mc.player.getEyePos()), false);
mc.interactionManager.interactBlock(this.mc.player, Hand.MAIN_HAND, bhr);
mc.interactionManager.interactItem(this.mc.player, Hand.MAIN_HAND);
}
}
}
}

0 comments on commit 543972f

Please sign in to comment.