From 0c2d5b9b7423498efd6e990fd04e4cf57bb4b75b Mon Sep 17 00:00:00 2001 From: Gero <gecam59@gmail.com> Date: Sun, 3 Mar 2024 21:43:00 +0100 Subject: [PATCH] Configurable max block/fluid ticks (#10266) --- .../Configurable-max-block-fluid-ticks.patch | 22 +++++++++++++++++++ patches/server/Paper-config-files.patch | 2 ++ 2 files changed, 24 insertions(+) create mode 100644 patches/server/Configurable-max-block-fluid-ticks.patch diff --git a/patches/server/Configurable-max-block-fluid-ticks.patch b/patches/server/Configurable-max-block-fluid-ticks.patch new file mode 100644 index 0000000000..d1569062ef --- /dev/null +++ b/patches/server/Configurable-max-block-fluid-ticks.patch @@ -0,0 +1,22 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Gero <gecam59@gmail.com> +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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 +--- a/src/main/java/net/minecraft/server/level/ServerLevel.java ++++ b/src/main/java/net/minecraft/server/level/ServerLevel.java +@@ -0,0 +0,0 @@ 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 diff --git a/patches/server/Paper-config-files.patch b/patches/server/Paper-config-files.patch index f029a57424..a50d665718 100644 --- a/patches/server/Paper-config-files.patch +++ b/patches/server/Paper-config-files.patch @@ -1808,6 +1808,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + 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;