3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-16 03:20:07 +01:00
Paper/CraftBukkit-Patches/0137-Configurable-Hanging-Tick.patch

38 Zeilen
1.5 KiB
Diff

2016-03-01 01:23:45 +01:00
From f3190586ed2e1760267ef859761294383c4ec07c Mon Sep 17 00:00:00 2001
From: drXor <mcyoung@mit.edu>
Date: Sat, 9 Aug 2014 13:56:51 -0400
Subject: [PATCH] Configurable Hanging Tick
diff --git a/src/main/java/net/minecraft/server/EntityHanging.java b/src/main/java/net/minecraft/server/EntityHanging.java
2016-02-29 22:33:06 +01:00
index 0ff4df1..947c777 100644
--- a/src/main/java/net/minecraft/server/EntityHanging.java
+++ b/src/main/java/net/minecraft/server/EntityHanging.java
2016-02-29 22:33:06 +01:00
@@ -103,7 +103,7 @@ public abstract class EntityHanging extends Entity {
this.lastX = this.locX;
this.lastY = this.locY;
this.lastZ = this.locZ;
2016-02-29 22:33:06 +01:00
- if (this.d++ == 100 && !this.world.isClientSide) {
+ if (this.d++ == this.world.spigotConfig.hangingTickFrequency && !this.world.isClientSide) { // Spigot
this.d = 0;
if (!this.dead && !this.survives()) {
// CraftBukkit start - fire break events
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
2016-02-29 22:33:06 +01:00
index a4d7ebb..8b40760 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
2016-02-29 22:33:06 +01:00
@@ -275,4 +275,10 @@ public class SpigotWorldConfig
maxTntTicksPerTick = getInt( "max-tnt-per-tick", 100 );
log( "Max TNT Explosions: " + maxTntTicksPerTick );
}
+
+ public int hangingTickFrequency;
+ private void hangingTickFrequency()
+ {
+ hangingTickFrequency = getInt( "hanging-tick-frequency", 100 );
+ }
}
--
2016-02-29 22:33:06 +01:00
2.5.0