mirror of
https://hub.spigotmc.org/stash/scm/spigot/spigot.git
synced 2025-07-16 20:26:14 +00:00
41 lines
1.9 KiB
Diff
41 lines
1.9 KiB
Diff
From 34c223948be20b9bc3be01fbc2bc63ac95a43b6f Mon Sep 17 00:00:00 2001
|
|
From: md_5 <git@md-5.net>
|
|
Date: Mon, 14 Oct 2013 19:20:10 +1100
|
|
Subject: [PATCH] Arrow Despawn Rate
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/world/entity/projectile/EntityArrow.java b/src/main/java/net/minecraft/world/entity/projectile/EntityArrow.java
|
|
index 7f860aba6..c914bde78 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/projectile/EntityArrow.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/EntityArrow.java
|
|
@@ -386,7 +386,7 @@ public abstract class EntityArrow extends IProjectile {
|
|
|
|
protected void tickDespawn() {
|
|
++this.life;
|
|
- if (this.life >= 1200) {
|
|
+ if (this.life >= ((this instanceof EntityThrownTrident) ? this.level().spigotConfig.tridentDespawnRate : this.level().spigotConfig.arrowDespawnRate)) { // Spigot
|
|
this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
|
|
}
|
|
|
|
diff --git a/src/main/java/org/spigotmc/SpigotWorldConfig.java b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
index cec948a05..4894096ae 100644
|
|
--- a/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
+++ b/src/main/java/org/spigotmc/SpigotWorldConfig.java
|
|
@@ -246,4 +246,13 @@ public class SpigotWorldConfig
|
|
hopperCanLoadChunks = getBoolean( "hopper-can-load-chunks", false );
|
|
log( "Hopper Transfer: " + hopperTransfer + " Hopper Check: " + hopperCheck + " Hopper Amount: " + hopperAmount + " Hopper Can Load Chunks: " + hopperCanLoadChunks );
|
|
}
|
|
+
|
|
+ public int arrowDespawnRate;
|
|
+ public int tridentDespawnRate;
|
|
+ private void arrowDespawnRate()
|
|
+ {
|
|
+ arrowDespawnRate = getInt( "arrow-despawn-rate", 1200 );
|
|
+ tridentDespawnRate = getInt( "trident-despawn-rate", arrowDespawnRate );
|
|
+ log( "Arrow Despawn Rate: " + arrowDespawnRate + " Trident Respawn Rate:" + tridentDespawnRate );
|
|
+ }
|
|
}
|
|
--
|
|
2.49.0
|
|
|