Revert previous change to clear chunk list on the end of each tick, make it configurable instead.
Whilst the new behaviour was technically correct as it prevented the possibility of the chunk tick list actually increasing over time, it introduced a few issues, namely the fact that it slowed growth to unreasonable levels, and interfered with the values which server admins have finally tuned, and come to enjoy over the last few years. If it is absolutely essential that growth be halted and ticking reduced as much as possible, the config option is there for power users. If we wish to 'fix' this by default in the future, a new chunk ticking algorithm, which actually has meaningful config options should be designed. By: md_5 <git@md-5.net>
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 5d197934f78cbc807e7c6e7f5f04b613a8454c75 Mon Sep 17 00:00:00 2001
|
||||
From 11f449c45b4450a0c4641fe4e8de3b1abe1a1429 Mon Sep 17 00:00:00 2001
|
||||
From: md_5 <md_5@live.com.au>
|
||||
Date: Tue, 11 Jun 2013 12:56:02 +1000
|
||||
Subject: [PATCH] Better Chunk Tick Selection
|
||||
@@ -116,7 +116,7 @@ index cd529ec..53ab411 100644
|
||||
|
||||
this.methodProfiler.b();
|
||||
diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
index b9b967f..40bb548 100644
|
||||
index b9b967f..3a8856d 100644
|
||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||
@@ -306,10 +306,20 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -151,28 +151,37 @@ index b9b967f..40bb548 100644
|
||||
block.a(this, k2 + k, i3 + chunksection.getYPosition(), l2 + l, this.random);
|
||||
}
|
||||
}
|
||||
@@ -408,6 +419,7 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
@@ -408,6 +419,12 @@ public class WorldServer extends World implements org.bukkit.BlockChangeDelegate
|
||||
|
||||
this.methodProfiler.b();
|
||||
}
|
||||
+ this.chunkTickList.clear(); // Spigot
|
||||
+ // Spigot Start
|
||||
+ if ( spigotConfig.clearChunksOnTick )
|
||||
+ {
|
||||
+ chunkTickList.clear();
|
||||
+ }
|
||||
+ // Spigot End
|
||||
}
|
||||
|
||||
public boolean a(int i, int j, int k, Block block) {
|
||||
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
index 961ddb4..478d9e6 100644
|
||||
index 961ddb4..6ba7f5c 100644
|
||||
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
||||
@@ -68,4 +68,11 @@ public class SpigotWorldConfig
|
||||
@@ -68,4 +68,15 @@ public class SpigotWorldConfig
|
||||
config.addDefault( "world-settings.default." + path, def );
|
||||
return config.getString( "world-settings." + worldName + "." + path, config.getString( "world-settings.default." + path ) );
|
||||
}
|
||||
+
|
||||
+ public int chunksPerTick;
|
||||
+ public boolean clearChunksOnTick;
|
||||
+ private void chunksPerTick()
|
||||
+ {
|
||||
+ chunksPerTick = getInt( "chunks-per-tick", 650 );
|
||||
+ log( "Chunks to Grow per Tick: " + chunksPerTick );
|
||||
+
|
||||
+ clearChunksOnTick = getBoolean( "clear-tick-list", false );
|
||||
+ log( "Clear tick list: " + false );
|
||||
+ }
|
||||
}
|
||||
--
|
||||
|
||||
Reference in New Issue
Block a user