2014-08-17 21:47:36 +00:00
|
|
|
From b376680ab8cd0bd29566e11b7879db8b6cc83fed Mon Sep 17 00:00:00 2001
|
2014-08-09 22:27:35 +00:00
|
|
|
From: drXor <mcyoung@mit.edu>
|
|
|
|
Date: Sat, 9 Aug 2014 17:24:20 -0500
|
|
|
|
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..3b6d152 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.paperSpigotConfig.hangingTickFrequency && !this.world.isStatic) { // PaperSpigot - 100 -> this.world.paperSpigotConfig.hangingTickFrequency
|
|
|
|
this.e = 0;
|
|
|
|
if (!this.dead && !this.survives()) {
|
|
|
|
// CraftBukkit start - fire break events
|
|
|
|
diff --git a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2014-08-17 21:47:36 +00:00
|
|
|
index ce3fb73..552a53c 100644
|
2014-08-09 22:27:35 +00:00
|
|
|
--- a/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
|
|
|
+++ b/src/main/java/org/github/paperspigot/PaperSpigotWorldConfig.java
|
2014-08-17 21:47:36 +00:00
|
|
|
@@ -171,4 +171,11 @@ public class PaperSpigotWorldConfig
|
2014-08-09 22:27:35 +00:00
|
|
|
waterOverLavaFlowSpeed = getInt( "water-over-lava-flow-speed", 5 );
|
|
|
|
log( "Water over lava flow speed: " + waterOverLavaFlowSpeed);
|
|
|
|
}
|
|
|
|
+
|
|
|
|
+ public int hangingTickFrequency;
|
|
|
|
+ private void hangingTickSpeed()
|
|
|
|
+ {
|
|
|
|
+ hangingTickFrequency = getInt( "hanging-tick-frequency", 100);
|
|
|
|
+ log( "Hanging entities tick frequency: " + hangingTickFrequency);
|
|
|
|
+ }
|
|
|
|
}
|
|
|
|
--
|
|
|
|
1.9.1
|
|
|
|
|