Skip to content

Commit

Permalink
fix memory leak fixes not working for MP (#590)
Browse files Browse the repository at this point in the history
#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
  • Loading branch information
Glease authored Jan 10, 2025
1 parent fd08a93 commit 31173a1
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/main/java/codechicken/nei/ClientHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -325,9 +325,8 @@ public void loadWorld(World world, boolean fromServer) {

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;
}
Expand Down

0 comments on commit 31173a1

Please sign in to comment.