Skip to content

Commit ed04607

Browse files
committed
Update world leak patch to 1.18
1 parent fa8d83a commit ed04607

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

common/src/main/java/org/embeddedt/modernfix/common/mixin/bugfix/world_leaks/MinecraftMixin.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ private void clearLevelDataForLeaks(CallbackInfo ci) {
3232
}
3333
this.level.getChunkSource().lightEngine = new LevelLightEngine(this.level.getChunkSource(), false, false);
3434
// clear BE list otherwise they will hold chunks
35-
this.level.blockEntityList.clear();
35+
this.level.blockEntityTickers.clear();
3636
} catch(RuntimeException e) {
3737
ModernFix.LOGGER.error("Exception clearing level data", e);
3838
}

common/src/main/resources/modernfix.accesswidener

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ mutable field net/minecraft/client/multiplayer/ClientChunkCache lightEngine Lnet
66
accessible class net/minecraft/client/multiplayer/ClientChunkCache$Storage
77
accessible field net/minecraft/client/multiplayer/ClientChunkCache$Storage chunks Ljava/util/concurrent/atomic/AtomicReferenceArray;
88

9+
accessible field net/minecraft/world/level/Level blockEntityTickers Ljava/util/List;
10+
911
accessible class net/minecraft/client/renderer/RenderType$CompositeRenderType
1012
accessible method net/minecraft/nbt/CompoundTag <init> (Ljava/util/Map;)V
1113

0 commit comments

Comments
 (0)