aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGero <[email protected]>2024-03-03 21:43:00 +0100
committerGitHub <[email protected]>2024-03-03 15:43:00 -0500
commitce5c8dd379faa1a9bf413481269a6ddf816c049c (patch)
tree9fc311d49ecd7d4ea34cfb0f57e4f6ea6f0f6e0f
parentbbc03d811602c3040658875dfc921ce3724091b0 (diff)
downloadPaper-ce5c8dd379faa1a9bf413481269a6ddf816c049c.tar.gz
Paper-ce5c8dd379faa1a9bf413481269a6ddf816c049c.zip
Configurable max block/fluid ticks (#10266)
-rw-r--r--patches/server/0005-Paper-config-files.patch8
-rw-r--r--patches/server/1051-Configurable-max-block-fluid-ticks.patch22
2 files changed, 27 insertions, 3 deletions
diff --git a/patches/server/0005-Paper-config-files.patch b/patches/server/0005-Paper-config-files.patch
index c9327e3fc2..9bc3647637 100644
--- a/patches/server/0005-Paper-config-files.patch
+++ b/patches/server/0005-Paper-config-files.patch
@@ -15,7 +15,7 @@ public net.minecraft.server.dedicated.DedicatedServerProperties reload(Lnet/mine
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
diff --git a/build.gradle.kts b/build.gradle.kts
-index 2df1cae62cff433a7f3f55f561f70719bb6a745b..65e9d5918d46b123fb4f8122344a7d3863aec758 100644
+index 8d2aa99b4bd0d1c46c66274907a1f11d605a75da..e865c5ce514770f4fde9146b6e7138e88932c33b 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -11,6 +11,7 @@ dependencies {
@@ -1390,10 +1390,10 @@ index 0000000000000000000000000000000000000000..351fbbc577556ebbd62222615801a96b
+}
diff --git a/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
new file mode 100644
-index 0000000000000000000000000000000000000000..385ca2c1022e0985550a5cc2bbff953f1aa33f5c
+index 0000000000000000000000000000000000000000..1a914ab53c24476473edc433d64daca6ec1c51d9
--- /dev/null
+++ b/src/main/java/io/papermc/paper/configuration/WorldConfiguration.java
-@@ -0,0 +1,548 @@
+@@ -0,0 +1,550 @@
+package io.papermc.paper.configuration;
+
+import com.google.common.collect.HashBasedTable;
@@ -1808,6 +1808,8 @@ index 0000000000000000000000000000000000000000..385ca2c1022e0985550a5cc2bbff953f
+ public boolean portalSearchVanillaDimensionScaling = true;
+ public boolean disableTeleportationSuffocationCheck = false;
+ public IntOr.Disabled netherCeilingVoidDamageHeight = IntOr.Disabled.DISABLED;
++ public int maxFluidTicks = 65536;
++ public int maxBlockTicks = 65536;
+ }
+
+ public Spawn spawn;
diff --git a/patches/server/1051-Configurable-max-block-fluid-ticks.patch b/patches/server/1051-Configurable-max-block-fluid-ticks.patch
new file mode 100644
index 0000000000..c1d19d41e3
--- /dev/null
+++ b/patches/server/1051-Configurable-max-block-fluid-ticks.patch
@@ -0,0 +1,22 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Gero <[email protected]>
+Date: Mon, 19 Feb 2024 17:39:59 +0100
+Subject: [PATCH] Configurable max block/fluid ticks
+
+
+diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
+index 6907d1be36fbdf0856c0e11983218d2fd1f9cb46..4bca3d20d1a01270a10c1e643a312fe462305b5d 100644
+--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
++++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
+@@ -849,9 +849,9 @@ public class ServerLevel extends Level implements WorldGenLevel {
+ if (!this.isDebug() && flag) {
+ j = this.getGameTime();
+ gameprofilerfiller.push("blockTicks");
+- this.blockTicks.tick(j, 65536, this::tickBlock);
++ this.blockTicks.tick(j, paperConfig().environment.maxBlockTicks, this::tickBlock); // Paper - configurable max block ticks
+ gameprofilerfiller.popPush("fluidTicks");
+- this.fluidTicks.tick(j, 65536, this::tickFluid);
++ this.fluidTicks.tick(j, paperConfig().environment.maxFluidTicks, this::tickFluid); // Paper - configurable max fluid ticks
+ gameprofilerfiller.pop();
+ }
+ this.timings.scheduledBlocks.stopTiming(); // Paper