2015-04-09 03:41:04 +00:00
|
|
|
From 49d025099bde101776e015ca161460d10deb40a1 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
|
2015-02-28 11:36:22 +00:00
|
|
|
index 16dfb1d..e491684 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
|
2015-02-28 11:36:22 +00:00
|
|
|
@@ -96,7 +96,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;
|
2015-02-28 11:36:22 +00:00
|
|
|
- if (this.c++ == 100 && !this.world.isClientSide) {
|
|
|
|
+ if (this.c++ == this.world.spigotConfig.hangingTickFrequency && !this.world.isClientSide) {
|
2014-11-28 01:17:45 +00:00
|
|
|
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-28 11:36:22 +00:00
|
|
|
index 3b6d4c0..042ec2a 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
|
2015-02-28 11:36:22 +00:00
|
|
|
@@ -324,4 +324,10 @@ public class SpigotWorldConfig
|
2014-08-25 21:30:52 +00:00
|
|
|
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
|
|
|
|