mirror of
https://hub.spigotmc.org/stash/scm/spigot/spigot.git
synced 2025-09-18 21:33:01 +00:00
37 lines
1.6 KiB
Diff
37 lines
1.6 KiB
Diff
From 6768e3573cd464c48fd3a663465da7cd76698aa5 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/world/entity/decoration/EntityHanging.java b/src/main/java/net/minecraft/world/entity/decoration/EntityHanging.java
|
|
index 7d28b5e45..1dde5897c 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/decoration/EntityHanging.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/decoration/EntityHanging.java
|
|
@@ -120,7 +120,7 @@ public abstract class EntityHanging extends Entity {
|
|
public void tick() {
|
|
if (!this.level.isClientSide) {
|
|
this.checkOutOfWorld();
|
|
- if (this.checkInterval++ == 100) {
|
|
+ if (this.checkInterval++ == this.level.spigotConfig.hangingTickFrequency) { // Spigot
|
|
this.checkInterval = 0;
|
|
if (!this.isRemoved() && !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 3e8869001..314a0f220 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
@@ -365,4 +365,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.34.1
|
|
|