diff --git a/patches/net/minecraft/world/gen/ChunkProviderServer.java.patch b/patches/net/minecraft/world/gen/ChunkProviderServer.java.patch index f4b1663..1bc3731 100644 --- a/patches/net/minecraft/world/gen/ChunkProviderServer.java.patch +++ b/patches/net/minecraft/world/gen/ChunkProviderServer.java.patch @@ -429,11 +429,11 @@ - } - } + // Cauldron static - check if the chunk was accessed recently and keep it loaded if there are players in world -+ /*if (!shouldUnloadChunk(chunk) && this.worldObj.playerEntities.size() > 0) ++ if (!shouldUnloadChunk(chunk) && this.worldObj.playerEntities.size() > 0) + { + CauldronHooks.logChunkUnload(this, chunk.xPosition, chunk.zPosition, "** Chunk kept from unloading due to recent activity"); + continue; -+ }*/ ++ } + // Cauldron end - this.chunksToUnload.remove(olong); @@ -500,10 +500,10 @@ + return loadedChunkHashMap_KC.get(chunkHash).lastAccessedTick; + } + -+ /*private boolean shouldUnloadChunk(Chunk chunk) ++ private boolean shouldUnloadChunk(Chunk chunk) + { + if (chunk == null) return false; -+ return MinecraftServer.getServer().getTickCounter() - chunk.lastAccessedTick > CauldronConfig.chunkGCGracePeriod.getValue(); -+ }*/ ++ return MinecraftServer.getServer().getTickCounter() - chunk.lastAccessedTick > MinecraftServer.getServer().cauldronConfig.chunkGCGracePeriod.getValue(); ++ } + // Cauldron end }