28414e7e28
6669d6ecd2b b2740df50bb bf71dc61149 fba27a2ea80 92ee7e7f8ec b28f0d3de23 4beb4ac3918 0ddb6f3dde8 afe301fe892 b8f6402bbbe
38 Zeilen
1.6 KiB
Diff
38 Zeilen
1.6 KiB
Diff
From a3fc80cb344d91515b2f514b689063f83721b43b 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 76bc12a..d34e5bf 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHanging.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHanging.java
|
|
@@ -81,7 +81,7 @@ public abstract class EntityHanging extends Entity {
|
|
this.lastX = this.locX;
|
|
this.lastY = this.locY;
|
|
this.lastZ = this.locZ;
|
|
- 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;
|
|
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 46377ab..420c584 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 );
|
|
+ }
|
|
}
|
|
--
|
|
2.1.0
|
|
|