@ -429,11 +429,11 @@
- }
- }
- }
- }
+ // Cauldron static - check if the chunk was accessed recently and keep it loaded if there are players in world
+ // 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");
+ CauldronHooks.logChunkUnload(this, chunk.xPosition, chunk.zPosition, "** Chunk kept from unloading due to recent activity");
+ continue;
+ continue;
+ }*/
+ }
+ // Cauldron end
+ // Cauldron end
- this.chunksToUnload.remove(olong);
- this.chunksToUnload.remove(olong);
@ -500,10 +500,10 @@
+ return loadedChunkHashMap_KC.get(chunkHash).lastAccessedTick;
+ return loadedChunkHashMap_KC.get(chunkHash).lastAccessedTick;
+ }
+ }
+
+
+ /* private boolean shouldUnloadChunk(Chunk chunk)
+ private boolean shouldUnloadChunk(Chunk chunk)
+ {
+ {
+ if (chunk == null) return false;
+ if (chunk == null) return false;
+ return MinecraftServer.getServer().getTickCounter() - chunk.lastAccessedTick > C auldronConfig.chunkGCGracePeriod.getValue();
+ return MinecraftServer.getServer().getTickCounter() - chunk.lastAccessedTick > MinecraftServer.getServer().c auldronConfig.chunkGCGracePeriod.getValue();
+ }*/
+ }
+ // Cauldron end
+ // Cauldron end
}
}