summaryrefslogtreecommitdiff
path: root/src/main/java/net/justlearning/arslaan3102/arslaansmagichax/ArslaansMagicHaxClient.java
blob: 274ca76003d6b566eab492098b03eaddb5818759 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
package net.justlearning.arslaan3102.arslaansmagichax;

import net.fabricmc.api.ClientModInitializer;
import net.fabricmc.fabric.api.client.command.v2.ClientCommandRegistrationCallback;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents;
import net.justlearning.arslaan3102.arslaansmagichax.commands.*;
import net.justlearning.arslaan3102.arslaansmagichax.modules.ModuleManager;
import net.justlearning.arslaan3102.arslaansmagichax.modules.impl.*;

public class ArslaansMagicHaxClient implements ClientModInitializer {
    public static Flight flight = new Flight();
    public static NoFall noFall = new NoFall();
    public static Waterwalk waterwalk = new Waterwalk();
    public static NoAttackCooldown noAttackCooldown = new NoAttackCooldown();
    public static GhostScaffold ghostScaffold = new GhostScaffold();
    public static ClickGUI clickGUI = new ClickGUI();
    public static FakeSneak fakeSneak = new FakeSneak();
    public static NoPackets noPackets = new NoPackets();
    public static Criticals criticals = new Criticals();
    public static AutoClicker autoClicker = new AutoClicker();
    public static GUN gun = new GUN();
    public static Spider spider = new Spider();
    public static Speed speed = new Speed();
    public static Fullbright fullbright = new Fullbright();
    public static Jetpack jetpack = new Jetpack();
    public static GravityModifier gravityModifier = new GravityModifier();
    public static Xray xray = new Xray();
    public static HideModulesHUD hideModulesHUD = new HideModulesHUD();

    @Override
    public void onInitializeClient() {
        ClientCommandRegistrationCallback.EVENT.register(HackTP::register);
        ClientCommandRegistrationCallback.EVENT.register(ModuleToggleCommand::register);
        ClientCommandRegistrationCallback.EVENT.register(HackXP::register);
        ClientCommandRegistrationCallback.EVENT.register(HackSetblock::register);
        ClientCommandRegistrationCallback.EVENT.register(HackGive::register);
        ClientCommandRegistrationCallback.EVENT.register(CrashCommand::register); // crashes the game for the funny

        ModuleManager.INSTANCE.register(flight);
        ModuleManager.INSTANCE.register(noFall);
        ModuleManager.INSTANCE.register(waterwalk);
        ModuleManager.INSTANCE.register(noAttackCooldown);
        ModuleManager.INSTANCE.register(ghostScaffold);
        ModuleManager.INSTANCE.register(clickGUI);
        ModuleManager.INSTANCE.register(fakeSneak);
        ModuleManager.INSTANCE.register(noPackets);
        ModuleManager.INSTANCE.register(criticals);
        ModuleManager.INSTANCE.register(autoClicker);
        ModuleManager.INSTANCE.register(gun);
        ModuleManager.INSTANCE.register(spider);
        ModuleManager.INSTANCE.register(speed);
        ModuleManager.INSTANCE.register(fullbright);
        ModuleManager.INSTANCE.register(jetpack);
        ModuleManager.INSTANCE.register(gravityModifier);
        ModuleManager.INSTANCE.register(xray);
        ModuleManager.INSTANCE.register(hideModulesHUD);

        ModuleManager.INSTANCE.registerHUD();

        ModuleManager.INSTANCE.loadModuleStates();
        ModuleManager.INSTANCE.saveModuleStates(); // clean up garbage e.g. someone types in "obama.havedih=barapbarapba"

        ClientTickEvents.END_CLIENT_TICK.register(mc -> {
                ModuleManager.tick();
            }
        );

        ClientLifecycleEvents.CLIENT_STOPPING.register(client -> {
            ModuleManager.INSTANCE.close();
        });
    }
}