mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 18:45:54 +01:00
89d51d5f29
Because this exploit has been widely known for years and has not been fixed by Mojang, we decided that it was worth allowing people to toggle it on/off due to how easy it is to make it configurable. It should be noted that this decision does not promise all future exploits will be configurable.
23 lines
1.3 KiB
Diff
23 lines
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 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
|