2015-07-27 14:20:54 +02:00
|
|
|
From a476dbf685e3d8dde6453ff399a6a9ebd04782ae Mon Sep 17 00:00:00 2001
|
2014-08-25 23:30:52 +02: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-07-27 14:20:54 +02:00
|
|
|
index b93e317..f374c39 100644
|
2014-08-25 23:30:52 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityHanging.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityHanging.java
|
2015-02-28 12:36:22 +01:00
|
|
|
@@ -96,7 +96,7 @@ public abstract class EntityHanging extends Entity {
|
2014-08-25 23:30:52 +02:00
|
|
|
this.lastX = this.locX;
|
|
|
|
this.lastY = this.locY;
|
|
|
|
this.lastZ = this.locZ;
|
2015-02-28 12:36:22 +01:00
|
|
|
- if (this.c++ == 100 && !this.world.isClientSide) {
|
|
|
|
+ if (this.c++ == this.world.spigotConfig.hangingTickFrequency && !this.world.isClientSide) {
|
2014-11-28 02:17:45 +01:00
|
|
|
this.c = 0;
|
2014-08-25 23:30:52 +02: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-05-26 11:16:27 +02:00
|
|
|
index e2d673f..ab2f8bf 100644
|
2014-08-25 23:30:52 +02:00
|
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
2015-05-26 11:16:27 +02:00
|
|
|
@@ -326,4 +326,10 @@ public class SpigotWorldConfig
|
2014-08-25 23:30:52 +02: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 );
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
2015-05-09 22:23:26 +02:00
|
|
|
2.1.4
|
2014-08-25 23:30:52 +02:00
|
|
|
|