3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-15 12:30:06 +01:00
Paper/patches/server/0961-Configurable-max-block-fluid-ticks.patch
Riley Park f17519338b
Expose server build information (#10729)
* Expose server build information

* squash patches

* final tweaks

---------

Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
Co-authored-by: masmc05 <masmc05@gmail.com>
2024-05-15 17:06:59 -07:00

23 Zeilen
1.3 KiB
Diff

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 4616672c4be74421e2acbc9df96f7c8ff2782e55..3a1ecdaebfd64f4703eafc92b5895e1dbddd8ee6 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -500,9 +500,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