Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-15 11:00:06 +01:00
38 Zeilen
1.5 KiB
Diff
38 Zeilen
1.5 KiB
Diff
From 3d18bab0480aef5e09b13721276144d8e52af007 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 16dfb1d..e491684 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityHanging.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityHanging.java
|
|
@@ -96,7 +96,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.isClientSide) {
|
|
+ if (this.c++ == this.world.spigotConfig.hangingTickFrequency && !this.world.isClientSide) {
|
|
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 3b6d4c0..042ec2a 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
@@ -324,4 +324,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.4
|
|
|