fix world memory leak without breaking stuff (hopefully)

This commit is contained in:
Alexdoru committed 2025-06-05 01:43:53 +02:00
1 parent 47a2b61505
commit baf333a8ca
1 file changed
+4 -1
@@ -30,8 +30,11 @@ object MultipartEventHandler {
@SubscribeEvent
def worldUnLoad(event: WorldEvent.Unload) {
MultipartSPH.onWorldUnload(event.world)
if (event.world.isRemote)
if (event.world.isRemote) {
TileCache.clear()
} else {
MultipartSaveLoad.loadingWorld = null
}
}
@SubscribeEvent