From 87dc04b750dbac415597a3e5e98ad7875d24d058 Mon Sep 17 00:00:00 2001 From: tahg Date: Wed, 2 Mar 2011 00:24:22 -0800 Subject: [PATCH] limit chunk unloading to 50 per tick --- src/main/java/net/minecraft/server/ChunkProviderServer.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/net/minecraft/server/ChunkProviderServer.java b/src/main/java/net/minecraft/server/ChunkProviderServer.java index 5d54c2cd9c..86f3d60b0d 100644 --- a/src/main/java/net/minecraft/server/ChunkProviderServer.java +++ b/src/main/java/net/minecraft/server/ChunkProviderServer.java @@ -207,7 +207,7 @@ public class ChunkProviderServer implements IChunkProvider { if (!this.g.w) { // CraftBukkit start Server server = g.getServer(); - while (!this.a.isEmpty()) { + for (int i = 0; i < 50 && !this.a.isEmpty(); i++) { long chunkcoordinates = this.a.popFirst(); Chunk chunk = e.get(chunkcoordinates); if (chunk == null) continue;