fix memory leak fixes not working for MP (#590)

#258 addresses the memory leak in ItemMobSpawner. Unfortunately the clean up handler is not consistently called on every world unloaded. This PR fixes this issue by moving the call out of that if block
This commit is contained in:
Glease authored and GitHub committed 2025-01-10 17:11:52 +08:00
1 parent fd08a93554
commit 31173a1fbd
1 file changed
+1 -2
@@ -325,9 +325,8 @@ public class ClientHandler {
if (!Minecraft.getMinecraft().isSingleplayer()) // wait for server to initiate in singleplayer
NEIClientConfig.loadWorld("remote/" + ClientUtils.getServerIP().replace(':', '~'));
ItemMobSpawner.clearEntityReferences(world);
}
ItemMobSpawner.clearEntityReferences(world);
lastworld = world;
}