From a31ea28ec81e4b7176e348fc0e5396949f539de0 Mon Sep 17 00:00:00 2001 From: misterx Date: Fri, 13 Oct 2023 19:03:54 +0200 Subject: [PATCH] Reconfiguration phase disables modules. --- .../meteorclient/mixin/ClientPlayNetworkHandlerMixin.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/main/java/meteordevelopment/meteorclient/mixin/ClientPlayNetworkHandlerMixin.java b/src/main/java/meteordevelopment/meteorclient/mixin/ClientPlayNetworkHandlerMixin.java index 3016a695f9..a6f62321b2 100644 --- a/src/main/java/meteordevelopment/meteorclient/mixin/ClientPlayNetworkHandlerMixin.java +++ b/src/main/java/meteordevelopment/meteorclient/mixin/ClientPlayNetworkHandlerMixin.java @@ -52,6 +52,7 @@ public abstract class ClientPlayNetworkHandlerMixin extends ClientCommonNetworkH @Unique private boolean ignoreChatMessage; + @Unique private boolean worldNotNull; protected ClientPlayNetworkHandlerMixin(MinecraftClient client, ClientConnection connection, ClientConnectionState connectionState) { @@ -81,6 +82,12 @@ private void onGameJoinTail(GameJoinS2CPacket packet, CallbackInfo info) { MeteorClient.EVENT_BUS.post(GameJoinedEvent.get()); } + // the server sends a GameJoin packet after the reconfiguration phase + @Inject(method = "onEnterReconfiguration", at = @At("HEAD")) + private void onEnterReconfiguration(EnterReconfigurationS2CPacket packet, CallbackInfo info) { + MeteorClient.EVENT_BUS.post(GameLeftEvent.get()); + } + @Inject(method = "onPlaySound", at = @At("HEAD")) private void onPlaySound(PlaySoundS2CPacket packet, CallbackInfo info) { MeteorClient.EVENT_BUS.post(PlaySoundPacketEvent.get(packet));