Skip to content

Commit

Permalink
Fix calling OpenGL code on Netty thread
Browse files Browse the repository at this point in the history
  • Loading branch information
asiekierka authored and jrddunbr committed Dec 17, 2023
1 parent a6ab2ef commit 0b95a3d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/mods/eln/client/ConnectionListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import mods.eln.Eln;
import mods.eln.misc.Utils;
import mods.eln.misc.UtilsClient;
import net.minecraft.client.Minecraft;

import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
Expand All @@ -35,7 +36,7 @@ public void onConnectedToServerEvent(ClientConnectedToServerEvent event) {
@SubscribeEvent
public void onDisconnectedFromServerEvent(ClientDisconnectionFromServerEvent event) {
Utils.println("Disconnected from server " + FMLCommonHandler.instance().getEffectiveSide());
UtilsClient.glDeleteListsAllSafe();
Minecraft.getMinecraft().func_152344_a(UtilsClient::glDeleteListsAllSafe);
}

@SubscribeEvent
Expand Down

0 comments on commit 0b95a3d

Please sign in to comment.