mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-01 17:01:56 +01:00
Allow users to configure the tickNextTickList cap
This commit is contained in:
parent
3ce8cf1a9a
commit
819db3aba6
2 changed files with 27 additions and 3 deletions
|
@ -8,6 +8,14 @@ diff --git a/src/main/java/net/minecraft/server/WorldServer.java b/src/main/java
|
||||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
--- a/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
+++ b/src/main/java/net/minecraft/server/WorldServer.java
|
||||||
|
@@ -0,0 +0,0 @@ import java.util.logging.Level;
|
||||||
|
|
||||||
|
import org.bukkit.WeatherType;
|
||||||
|
import org.bukkit.block.BlockState;
|
||||||
|
-import org.bukkit.craftbukkit.util.LongHash;
|
||||||
|
|
||||||
|
import org.bukkit.event.block.BlockFormEvent;
|
||||||
|
import org.bukkit.event.weather.LightningStrikeEvent;
|
||||||
@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
@@ -0,0 +0,0 @@ public class WorldServer extends World implements IAsyncTaskHandler {
|
||||||
if (i != this.L.size()) {
|
if (i != this.L.size()) {
|
||||||
throw new IllegalStateException("TickNextTick list out of synch");
|
throw new IllegalStateException("TickNextTick list out of synch");
|
||||||
|
@ -22,11 +30,27 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
}
|
}
|
||||||
// CraftBukkit end
|
// CraftBukkit end
|
||||||
+ */
|
+ */
|
||||||
+ if (i > 10000) {
|
+ if (i > paperSpigotConfig.tickNextTickCap) {
|
||||||
+ i = 10000;
|
+ i = paperSpigotConfig.tickNextTickCap;
|
||||||
}
|
}
|
||||||
+ // PaperSpigot end
|
+ // PaperSpigot end
|
||||||
|
|
||||||
this.methodProfiler.a("cleaning");
|
this.methodProfiler.a("cleaning");
|
||||||
|
|
||||||
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
||||||
|
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||||
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
||||||
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
||||||
|
@@ -0,0 +0,0 @@ public class PaperSpigotWorldConfig
|
||||||
|
System.err.println( "==========================================" );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+
|
||||||
|
+ public int tickNextTickCap;
|
||||||
|
+ private void tickNextTickCap()
|
||||||
|
+ {
|
||||||
|
+ tickNextTickCap = 10000; // Higher values will be friendlier to vanilla style mechanics but may hurt performance
|
||||||
|
+ log( "WorldServer TickNextTick cap set at " + tickNextTickCap );
|
||||||
|
+ }
|
||||||
|
}
|
||||||
--
|
--
|
|
@ -103,7 +103,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||||
+ System.err.println( " Many TNT Related Settings Have Moved " );
|
+ System.err.println( " Many TNT Related Settings Have Moved " );
|
||||||
+ System.err.println( " Please check your config in paper.yml! " );
|
+ System.err.println( " Please check your config in paper.yml! " );
|
||||||
+ System.err.println( "==========================================" );
|
+ System.err.println( "==========================================" );
|
||||||
+ }
|
|
||||||
+ }
|
+ }
|
||||||
|
+ }
|
||||||
}
|
}
|
||||||
--
|
--
|
Loading…
Reference in a new issue