This repository was archived by the owner on Nov 6, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
228 additions
and
133 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package thunder.hack.cmd.impl; | ||
|
||
import com.mojang.brigadier.builder.LiteralArgumentBuilder; | ||
import net.minecraft.command.CommandSource; | ||
import org.jetbrains.annotations.NotNull; | ||
import thunder.hack.cmd.Command; | ||
|
||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS; | ||
import static thunder.hack.modules.client.MainSettings.isRu; | ||
|
||
public class GetNbtCommand extends Command { | ||
public GetNbtCommand() { | ||
super("nbt", "getnbt"); | ||
} | ||
|
||
@Override | ||
public void executeBuild(@NotNull LiteralArgumentBuilder<CommandSource> builder) { | ||
builder.executes(context -> { | ||
sendMessage(mc.player.getMainHandStack().hasNbt() ? mc.player.getMainHandStack().getNbt().toString() : isRu() ? "У этого предмета нет nbt тегов!" : "This item don't contains nbt tags!"); | ||
return SINGLE_SUCCESS; | ||
}); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package thunder.hack.cmd.impl; | ||
|
||
import com.mojang.brigadier.builder.LiteralArgumentBuilder; | ||
import net.minecraft.command.CommandSource; | ||
import thunder.hack.cmd.Command; | ||
|
||
import static com.mojang.brigadier.Command.SINGLE_SUCCESS; | ||
import static thunder.hack.modules.client.MainSettings.isRu; | ||
|
||
public class TreasureCommand extends Command { | ||
public TreasureCommand() { | ||
super("gettreasure", "treasure"); | ||
} | ||
|
||
@Override | ||
public void executeBuild(LiteralArgumentBuilder<CommandSource> builder) { | ||
builder.executes(context -> { | ||
if (mc.player.getMainHandStack().getItem().toString().equals("filled_map")) { | ||
StringBuilder result = new StringBuilder(); | ||
String rawNbt = mc.player.getMainHandStack().getNbt().toString(); | ||
for (int i = rawNbt.indexOf("x"); i < rawNbt.indexOf("]") - 2; i++) | ||
result.append(rawNbt.charAt(i)); | ||
sendMessage(isRu() ? "Нашел! Координаты: " + result : "Found! Coords: " + result); | ||
} else sendMessage(isRu() ? "Возьми карту в руки!" : "Get map in hand!"); | ||
return SINGLE_SUCCESS; | ||
}); | ||
} | ||
} |
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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,100 @@ | ||
package thunder.hack.modules.misc; | ||
|
||
import meteordevelopment.orbit.EventHandler; | ||
import thunder.hack.ThunderHack; | ||
import thunder.hack.events.impl.SettingEvent; | ||
import thunder.hack.modules.Module; | ||
import thunder.hack.setting.Setting; | ||
import thunder.hack.utility.Timer; | ||
|
||
import java.util.Random; | ||
import java.util.concurrent.ThreadLocalRandom; | ||
|
||
public class AntiAfk extends Module { | ||
public AntiAfk() { | ||
super("AntiAfk", Category.MISC); | ||
public class AntiAFK extends Module { | ||
|
||
public AntiAFK() { | ||
super("AntiAFK", Category.MISC); | ||
} | ||
|
||
private final Setting<Mode> mode = new Setting<>("Mode", Mode.Simple); | ||
private final Setting<Boolean> spin = new Setting<>("Spin", false, v -> mode.getValue() == Mode.Simple); | ||
private final Setting<Float> speed = new Setting<>("Speed", 5f, 1f, 7f, v -> mode.getValue() == Mode.Simple); | ||
private final Setting<Boolean> jump = new Setting<>("Jump", false, v -> mode.getValue() == Mode.Simple); | ||
private final Setting<Boolean> swing = new Setting<>("Swing", false, v -> mode.getValue() == Mode.Simple); | ||
private final Setting<Boolean> alwayssneak = new Setting<>("AlwaysSneak", false, v -> mode.getValue() == Mode.Simple); | ||
private final Setting<Integer> radius = new Setting<>("Radius", 64, 1, 128, v -> mode.getValue() == Mode.Baritone); | ||
|
||
private int step; | ||
private Timer inactiveTime = new Timer(); | ||
|
||
private enum Mode { | ||
Simple, Baritone | ||
} | ||
private final Setting<Boolean> spin = new Setting<>("Spin", false); | ||
public Setting<Float> speed = new Setting<>("Speed", 5f, 1f, 7f); | ||
private final Setting<Boolean> jump = new Setting<>("Jump", false); | ||
private final Setting<Boolean> swing = new Setting<>("Swing", false); | ||
private final Setting<Boolean> alwayssneak = new Setting<>("AlwaysSneak", false); | ||
private float prevYaw; | ||
private final Random random = new Random(); | ||
|
||
@Override | ||
public void onEnable() { | ||
prevYaw = mc.player.getYaw(); | ||
if(alwayssneak.getValue()){mc.options.sneakKey.setPressed(true);} | ||
if (alwayssneak.getValue()) | ||
mc.options.sneakKey.setPressed(true); | ||
|
||
step = 0; | ||
} | ||
|
||
@EventHandler | ||
public void onSettingChange(SettingEvent e) { | ||
if(e.getSetting() == mode) | ||
step = 0; | ||
} | ||
|
||
@Override | ||
public void onUpdate(){ | ||
if(spin.getValue()){ | ||
prevYaw += speed.getValue(); | ||
mc.player.setYaw(prevYaw); | ||
} | ||
if(jump.getValue()){ | ||
if (mc.options.jumpKey.isPressed()) mc.options.jumpKey.setPressed(false); | ||
else if (random.nextInt(99) == 0) mc.options.jumpKey.setPressed(true); | ||
} | ||
if(swing.getValue()){ | ||
if (random.nextInt(99) == 0) mc.player.swingHand(mc.player.getActiveHand()); | ||
public void onUpdate() { | ||
if(mode.getValue() == Mode.Simple) { | ||
if (spin.getValue()) { | ||
double gcdFix = (Math.pow(mc.options.getMouseSensitivity().getValue() * 0.6 + 0.2, 3.0)) * 1.2; | ||
float newYaw = mc.player.getYaw() + speed.getValue(); | ||
mc.player.setYaw((float) (newYaw - (newYaw - mc.player.getYaw()) % gcdFix)); | ||
} | ||
|
||
if (jump.getValue() && mc.player.isOnGround()) | ||
mc.player.jump(); | ||
|
||
if (swing.getValue() && ThreadLocalRandom.current().nextInt(99) == 0) | ||
mc.player.swingHand(mc.player.getActiveHand()); | ||
} else { | ||
if(inactiveTime.every(5000)) { | ||
if(step > 3) | ||
step = 0; | ||
|
||
switch (step) { | ||
case 0: { | ||
mc.player.networkHandler.sendChatMessage("#goto ~ ~" + radius.getValue()); | ||
break; | ||
} | ||
case 1: { | ||
mc.player.networkHandler.sendChatMessage("#goto ~" + radius.getValue() + " ~"); | ||
break; | ||
} | ||
case 2: { | ||
mc.player.networkHandler.sendChatMessage("#goto ~ ~-" + radius.getValue()); | ||
break; | ||
} | ||
case 3: { | ||
mc.player.networkHandler.sendChatMessage("#goto ~-" + radius.getValue() + " ~"); | ||
break; | ||
} | ||
} | ||
step++; | ||
} | ||
} | ||
|
||
if(ThunderHack.playerManager.currentPlayerSpeed > 0.07) | ||
inactiveTime.reset(); | ||
} | ||
|
||
@Override | ||
public void onDisable() { | ||
if(alwayssneak.getValue()){mc.options.sneakKey.setPressed(false);} | ||
if (alwayssneak.getValue()) | ||
mc.options.sneakKey.setPressed(false); | ||
|
||
if(mode.getValue() == Mode.Baritone) | ||
mc.player.networkHandler.sendChatMessage("#stop"); | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.