diff options
Diffstat (limited to 'patches/unapplied/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch')
-rw-r--r-- | patches/unapplied/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/patches/unapplied/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch b/patches/unapplied/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch new file mode 100644 index 0000000000..a7f6855957 --- /dev/null +++ b/patches/unapplied/server/0070-Configurable-Non-Player-Arrow-Despawn-Rate.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Aikar <[email protected]> +Date: Fri, 18 Mar 2016 15:12:22 -0400 +Subject: [PATCH] Configurable Non Player Arrow Despawn Rate + +Can set a much shorter despawn rate for arrows that players can not pick up. + +diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +index e147c56ad30a8e634052385ee9fee97c1ac48dcd..8d9e78efcd07e0fea627c2a5a128c7f15cf3413c 100644 +--- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java ++++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java +@@ -312,7 +312,7 @@ public abstract class AbstractArrow extends Projectile { + + protected void tickDespawn() { + ++this.life; +- if (this.life >= ((this instanceof ThrownTrident) ? this.level().spigotConfig.tridentDespawnRate : this.level().spigotConfig.arrowDespawnRate)) { // Spigot ++ if (this.life >= (pickup == Pickup.CREATIVE_ONLY ? this.level().paperConfig().entities.spawning.creativeArrowDespawnRate.value() : (pickup == Pickup.DISALLOWED ? this.level().paperConfig().entities.spawning.nonPlayerArrowDespawnRate.value() : ((this instanceof ThrownTrident) ? this.level().spigotConfig.tridentDespawnRate : this.level().spigotConfig.arrowDespawnRate)))) { // Spigot // Paper - TODO: Extract this to init? + this.discard(); + } + |