Paper/CraftBukkit-Patches/0177-Configurable-Hanging-Tick.patch
Zach Brown cab333b217 Rebase (Update) from upstream SpigotMC
Don't send requests of every player was found in the global api cache SpigotMC/Spigot@841270ff1e
Correctly set the response code for the cached lookups and return the ... SpigotMC/Spigot@f170b7899c
Don't try and re-set the global api cache on reload SpigotMC/Spigot@b410a00a66
Use a compile time sneaky throw hack. SpigotMC/Spigot@508462b96b
Fix a missed rename in WorldGenGroundBush SpigotMC/Spigot@0614d8fae9
2014-11-28 14:19:07 -06:00

38 lines
1.6 KiB
Diff

From e42ad4133ebcf200241300257916824f62fa736e 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
index eec465b..106a15b 100644
--- a/src/main/java/net/minecraft/server/EntityHanging.java
+++ b/src/main/java/net/minecraft/server/EntityHanging.java
@@ -102,7 +102,7 @@ public abstract class EntityHanging extends Entity {
this.lastX = this.locX;
this.lastY = this.locY;
this.lastZ = this.locZ;
- if (this.e++ == 100 && !this.world.isStatic) {
+ if (this.e++ == this.world.spigotConfig.hangingTickFrequency && !this.world.isStatic) { // Spigot - 100 -> this.world.spigotConfig.hangingTickFrequency
this.e = 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
index 5e3dbf9..854ba6d 100644
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -349,4 +349,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 );
+ }
}
--
1.9.1