2015-02-26 10:40:16 +00:00
|
|
|
From e619fecb979a61dc602cff87e211d1925f2db05f Mon Sep 17 00:00:00 2001
|
2014-08-25 21:30:52 +00:00
|
|
|
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
|
2014-12-18 23:33:08 +00:00
|
|
|
index 6570340..b74c55e 100644
|
2014-08-25 21:30:52 +00:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityHanging.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityHanging.java
|
2014-12-18 23:33:08 +00:00
|
|
|
@@ -99,7 +99,7 @@ public abstract class EntityHanging extends Entity {
|
2014-08-25 21:30:52 +00:00
|
|
|
this.lastX = this.locX;
|
|
|
|
this.lastY = this.locY;
|
|
|
|
this.lastZ = this.locZ;
|
2014-11-28 01:17:45 +00:00
|
|
|
- if (this.c++ == 100 && !this.world.isStatic) {
|
|
|
|
+ if (this.c++ == this.world.spigotConfig.hangingTickFrequency && !this.world.isStatic) { // Spigot - 100 -> this.world.spigotConfig.hangingTickFrequency
|
|
|
|
this.c = 0;
|
2014-08-25 21:30:52 +00:00
|
|
|
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
|
2015-02-06 10:08:31 +00:00
|
|
|
index a88942e..b4f32f0 100644
|
2014-08-25 21:30:52 +00:00
|
|
|
--- 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 );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2014-11-28 01:17:45 +00:00
|
|
|
2.1.0
|
2014-08-25 21:30:52 +00:00
|
|
|
|