spigot/CraftBukkit-Patches/0038-Arrow-Despawn-Rate.patch

39 lines
1.5 KiB
Diff
Raw Normal View History

From 4442056b8c426a8c26d6ffaeddbe009e3c447c43 Mon Sep 17 00:00:00 2001
2014-04-12 14:18:37 +10:00
From: md_5 <md_5@live.com.au>
Date: Mon, 14 Oct 2013 19:20:10 +1100
Subject: [PATCH] Arrow Despawn Rate
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
2017-09-18 20:00:00 +10:00
index ba41470d8..3ff8b96f1 100644
2014-04-12 14:18:37 +10:00
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
2016-11-17 12:41:12 +11:00
@@ -157,7 +157,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
this.ay = 0;
} else {
++this.ax;
- if (this.ax >= 1200) {
+ if (this.ax >= world.spigotConfig.arrowDespawnRate) { // Spigot - First int after shooter
2014-04-12 14:18:37 +10:00
this.die();
}
2016-11-17 12:41:12 +11:00
}
2014-04-12 14:18:37 +10:00
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
index 9df9e0131..27afa7f99 100644
2014-04-12 14:18:37 +10:00
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
@@ -203,4 +203,11 @@ public class SpigotWorldConfig
2016-03-01 08:33:06 +11:00
log( "*** WARNING *** Please use this option with caution, SpigotMC is not responsible for any issues this option may cause in the future!" );
}
2014-04-12 14:18:37 +10:00
}
+
+ public int arrowDespawnRate;
+ private void arrowDespawnRate()
+ {
+ arrowDespawnRate = getInt( "arrow-despawn-rate", 1200 );
+ log( "Arrow Despawn Rate: " + arrowDespawnRate );
+ }
}
--
2017-11-17 10:24:35 +11:00
2.14.1
2014-04-12 14:18:37 +10:00