AntiAim module

AntiAim: Minecraft 26.3 cheat module, full source for every implementation (1 client: MelaHack (ThunderHack fork)).

1 implementationPLAYER

Clients with this module

Full module source: 1 implementation

Every implementation below is the complete module file, verbatim. Expand a client to read its code.

MelaHack (ThunderHack fork)PLAYERsrc/main/java/thunder/hack/features/modules/player/AntiAim.javaJava · 121 lines · 5.0 KB

Makes your head crazy (useless).

SettingsPitchModeYawModeSpeedYawDeltaPitchDeltaYawOffsetBodySyncAllowInteract
AntiAim.javaJava · Minecraft 26.2 · 121 lines · 5.0 KB · complete file, verbatimOriginal ↗
1
package thunder.hack.features.modules.player;
2
3
import meteordevelopment.orbit.EventHandler;
4
import meteordevelopment.orbit.EventPriority;
5
import thunder.hack.core.manager.client.ModuleManager;
6
import thunder.hack.events.impl.EventSync;
7
import thunder.hack.events.impl.PlayerUpdateEvent;
8
import thunder.hack.features.modules.Module;
9
import thunder.hack.setting.Setting;
10
import thunder.hack.utility.math.MathUtility;
11
12
public class AntiAim extends Module {
13
    public AntiAim() {
14
        super("AntiAim", Category.PLAYER);
15
    }
16
17
    private final Setting<Mode> pitchMode = new Setting<>("PitchMode", Mode.None);
18
    private final Setting<Mode> yawMode = new Setting<>("YawMode", Mode.None);
19
20
    public enum Mode {None, RandomAngle, Spin, Sinus, Fixed, Static, Jitter}
21
22
23
    public Setting<Integer> Speed = new Setting<>("Speed", 1, 1, 45);
24
    public Setting<Integer> yawDelta = new Setting<>("YawDelta", 60, -360, 360);
25
    public Setting<Integer> pitchDelta = new Setting<>("PitchDelta", 10, -90, 90);
26
    public Setting<Integer> yawOffset = new Setting<>("YawOffset", 0, -180, 180);
27
    public final Setting<Boolean> bodySync = new Setting<>("BodySync", true);
28
    public final Setting<Boolean> allowInteract = new Setting<>("AllowInteract", true);
29
30
    private float rotationYaw, rotationPitch, pitch_sinus_step, yaw_sinus_step;
31
32
    @EventHandler(priority = 99)
33
    public void onSync(EventSync e) {
34
        if(allowInteract.getValue() && (mc.options.keyAttack.isDown() || mc.options.keyAttack.isDown())) return;
35
        double gcdFix = (Math.pow(mc.options.sensitivity().get() * 0.6 + 0.2, 3.0)) * 1.2;
36
        if (yawMode.getValue() != Mode.None) {
37
            mc.player.setYRot((float) (rotationYaw - (rotationYaw - mc.player.getYRot()) % gcdFix));
38
            if (bodySync.getValue())
39
                mc.player.setYBodyRot(rotationYaw);
40
        }
41
        if (pitchMode.getValue() != Mode.None)
42
            mc.player.setXRot((float) (rotationPitch - (rotationPitch - mc.player.getXRot()) % gcdFix));
43
    }
44
45
    @EventHandler(priority = EventPriority.HIGH)
46
    public void onCalc(PlayerUpdateEvent e) {
47
        if (pitchMode.getValue() == Mode.RandomAngle)
48
            if (mc.player.tickCount % Speed.getValue() == 0)
49
                rotationPitch = MathUtility.random(90, -90);
50
51
        if (yawMode.getValue() == Mode.RandomAngle)
52
            if (mc.player.tickCount % Speed.getValue() == 0)
53
                rotationYaw = MathUtility.random(0, 360);
54
55
        if (yawMode.getValue() == Mode.Spin)
56
            if (mc.player.tickCount % Speed.getValue() == 0) {
57
                rotationYaw += yawDelta.getValue();
58
                if (rotationYaw > 360) rotationYaw = 0;
59
                if (rotationYaw < 0) rotationYaw = 360;
60
            }
61
62
        if (pitchMode.getValue() == Mode.Spin)
63
            if (mc.player.tickCount % Speed.getValue() == 0) {
64
                rotationPitch += pitchDelta.getValue();
65
                if (rotationPitch > 90) rotationPitch = -90;
66
                if (rotationPitch < -90) rotationPitch = 90;
67
            }
68
69
        if (pitchMode.getValue() == Mode.Sinus) {
70
            pitch_sinus_step += Speed.getValue() / 10f;
71
            rotationPitch = (float) (mc.player.getXRot() + pitchDelta.getValue() * Math.sin(pitch_sinus_step));
72
            rotationPitch = MathUtility.clamp(rotationPitch, -90, 90);
73
        }
74
75
        if (yawMode.getValue() == Mode.Sinus) {
76
            yaw_sinus_step += Speed.getValue() / 10f;
77
            rotationYaw = (float) ((mc.player.getYRot() + yawDelta.getValue() * Math.sin(yaw_sinus_step)) + yawOffset.getValue());
78
        }
79
80
        if (pitchMode.getValue() == Mode.Fixed)
81
            rotationPitch = pitchDelta.getValue();
82
83
        if (yawMode.getValue() == Mode.Fixed)
84
            rotationYaw = yawDelta.getValue();
85
86
        if (pitchMode.getValue() == Mode.Static) {
87
            rotationPitch = mc.player.getXRot() + pitchDelta.getValue();
88
            rotationPitch = MathUtility.clamp(rotationPitch, -90, 90);
89
        }
90
        if (yawMode.getValue() == Mode.Static)
91
            rotationYaw =  mc.player.getYRot() % 360 + yawDelta.getValue();
92
93
94
        // господи какое говно я написал
95
        if (pitchMode.getValue() == Mode.Jitter) {
96
97
            if (mc.player.tickCount % (Speed.getValue() * 2) == 0) {
98
                rotationPitch = pitchDelta.getValue() / 2f;
99
            }
100
101
            if (mc.player.tickCount % (Speed.getValue() * 2) == Speed.getValue()) {
102
                rotationPitch = pitchDelta.getValue() / -2f;
103
            }
104
        }
105
106
        if (yawMode.getValue() == Mode.Jitter) {
107
108
            if (mc.player.tickCount % (Speed.getValue() * 2) == 0) {
109
                rotationYaw = yawDelta.getValue() / 2f + (float) yawOffset.getValue() + mc.player.getYRot();
110
            }
111
112
            if (mc.player.tickCount % (Speed.getValue() * 2) == Speed.getValue()) {
113
                rotationYaw = yawDelta.getValue() / -2f + (float) yawOffset.getValue() + mc.player.getYRot();
114
            }
115
116
        }
117
118
        ModuleManager.rotations.fixRotation = rotationYaw;
119
    }
120
}
121