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 boubou19 committed 2025-02-04 11:16:17 +01:00
1 parent ebfd588d39
commit 0f9df94b8a
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;
}