aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0966-Configurable-max-block-fluid-ticks.patch
blob: ed1c561d6e9f12a956f3eddc937d4701606866c0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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 55c7c078e0219e4a6a9e22db23f671ba728ff036..5eab8532bfe3b7082123a12b8a3e62d25a4463d3 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -506,9 +506,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