mirror of
https://hub.spigotmc.org/stash/scm/spigot/spigot.git
synced 2024-11-21 20:56:14 +00:00
41 lines
1.9 KiB
Diff
41 lines
1.9 KiB
Diff
From 0c270a06ed4109fc4c876f4276662265a9ba6f33 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 cc352059d6..0b2c355a69 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/projectile/EntityArrow.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/projectile/EntityArrow.java
|
|
@@ -381,7 +381,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 cec948a055..4894096ae1 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.47.0
|
|
|