13
0
geforkt von Mirrors/Paper

Configurable Non Player Arrow Despawn Rate

Can set a much shorter despawn rate for arrows that players can not pick up.
Dieser Commit ist enthalten in:
Aikar 2016-03-18 15:12:22 -04:00
Ursprung 20b9d3de7b
Commit 686b77345f

Datei anzeigen

@ -113,7 +113,7 @@
++this.life;
- if (this.life >= 1200) {
- this.discard();
+ 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 - Configurable non-player arrow despawn rate; TODO: Extract this to init?
+ this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
}