fix world leak in ItemMobSpawner

This commit is contained in:
Alexdoru committed 2025-06-02 23:15:35 +02:00
1 parent d469fdc90d
commit 1cd4f802dd
5 files changed
+32 -45

No files matched your search

@@ -338,6 +338,7 @@ public class ClientHandler {
Minecraft mc = Minecraft.getMinecraft();
if (event.world == mc.theWorld) {
NEIClientConfig.unloadWorld();
ItemMobSpawner.clearEntityReferences();
}
}
@@ -354,8 +355,6 @@ public class ClientHandler {
if (!Minecraft.getMinecraft().isSingleplayer()) // wait for server to initiate in singleplayer
NEIClientConfig.loadWorld("remote/" + ClientUtils.getServerIP().replace(':', '~'));
}
ItemMobSpawner.clearEntityReferences(world);
lastworld = world;
}
}