File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed
common/src/main/java/org/embeddedt/modernfix
common/mixin/perf/chunk_meshing Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -63,14 +63,19 @@ public void onServerStarted() {
6363 ClassInfoManager .clear ();
6464 }
6565
66+ @ SuppressWarnings ("ConstantValue" )
6667 public void onServerDead (MinecraftServer server ) {
6768 /* Clear as much data from the integrated server as possible, in case a mod holds on to it */
6869 try {
6970 for (ServerLevel level : server .getAllLevels ()) {
7071 ChunkMap chunkMap = level .getChunkSource ().chunkMap ;
71- chunkMap .updatingChunkMap .clear ();
72- chunkMap .visibleChunkMap .clear ();
73- chunkMap .pendingUnloads .clear ();
72+ // Null check for mods that replace chunk system
73+ if (chunkMap .updatingChunkMap != null )
74+ chunkMap .updatingChunkMap .clear ();
75+ if (chunkMap .visibleChunkMap != null )
76+ chunkMap .visibleChunkMap .clear ();
77+ if (chunkMap .pendingUnloads != null )
78+ chunkMap .pendingUnloads .clear ();
7479 }
7580 } catch (RuntimeException e ) {
7681 ModernFix .LOGGER .error ("Couldn't clear chunk data" , e );
Original file line number Diff line number Diff line change 33import net .minecraft .client .renderer .chunk .SectionCompiler ;
44import net .minecraft .core .BlockPos ;
55import org .embeddedt .modernfix .annotation .ClientOnlyMixin ;
6+ import org .embeddedt .modernfix .annotation .RequiresMod ;
67import org .embeddedt .modernfix .util .blockpos .SectionBlockPosIterator ;
78import org .spongepowered .asm .mixin .Mixin ;
89import org .spongepowered .asm .mixin .injection .At ;
910import org .spongepowered .asm .mixin .injection .Redirect ;
1011
1112@ Mixin (value = SectionCompiler .class , priority = 2000 )
1213@ ClientOnlyMixin
14+ @ RequiresMod ("!fluidlogged" )
1315public class RebuildTaskMixin {
1416 /**
1517 * @author embeddedt
You can’t perform that action at this time.
0 commit comments