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

39 lines
1.5 KiB
Diff
Raw Normal View History

2018-01-22 01:19:57 +11:00
From a63fd17d7e5ae8f3553026f181fb4e7161fb5ae7 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
2017-09-18 20:00:00 +10:00
index 1bdcd8e15..bdb7bed18 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
@@ -201,4 +201,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