Update world leak patch to 1.18

This commit is contained in:
embeddedt 2023-08-15 13:08:42 -04:00
parent fa8d83a21a
commit ed0460747c
No known key found for this signature in database
GPG Key ID: A69433EC199B5613
2 changed files with 3 additions and 1 deletions

View File

@ -32,7 +32,7 @@ public class MinecraftMixin {
}
this.level.getChunkSource().lightEngine = new LevelLightEngine(this.level.getChunkSource(), false, false);
// clear BE list otherwise they will hold chunks
this.level.blockEntityList.clear();
this.level.blockEntityTickers.clear();
} catch(RuntimeException e) {
ModernFix.LOGGER.error("Exception clearing level data", e);
}

View File

@ -6,6 +6,8 @@ mutable field net/minecraft/client/multiplayer/ClientChunkCache lightEngine Lnet
accessible class net/minecraft/client/multiplayer/ClientChunkCache$Storage
accessible field net/minecraft/client/multiplayer/ClientChunkCache$Storage chunks Ljava/util/concurrent/atomic/AtomicReferenceArray;
accessible field net/minecraft/world/level/Level blockEntityTickers Ljava/util/List;
accessible class net/minecraft/client/renderer/RenderType$CompositeRenderType
accessible method net/minecraft/nbt/CompoundTag <init> (Ljava/util/Map;)V