Skip to content

Commit

Permalink
Reconfiguration phase disables modules.
Browse files Browse the repository at this point in the history
  • Loading branch information
19MisterX98 authored and Wide-Cat committed Oct 13, 2023
1 parent f6cea7c commit 47b95b6
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit 47b95b6

Please sign in to comment.