Files
Purpur/patches/server/0109-MC-125757-Fix-Always-increment-arrow-despawn-counter.patch
William Blake Galbreath a2db5eebbe Updated Upstream (Paper)
Upstream has released updates that appears to apply and compile correctly

Paper Changes:
8ce3dd5f [CI-SKIP] Fix Mojang API Brigadier dep - THIS IS NOT A NEW BUILD
00d760a5 Fix build due to spigot changing the build timestamp process
842e040c Updated Upstream (Bukkit/CraftBukkit/Spigot)
c03260a2 Add getter and setter for villager's numberOfRestocksToday (#3231)
fe366fbe null check tracker for entity metadata update - Fixes #3070
fdf41b74 Implement Brigadier Mojang API
e0ea2e0e Entity Activation Range 2.0! Major improvements to restoring behavior
10396d28 Fix Tracking Range mismatch on Vehicle/Passenger checks
2020-04-28 20:14:57 -05:00

43 lines
2.0 KiB
Diff

From 0480f8f2291ede2dee7dd039eba0200dff9352f7 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Fri, 21 Feb 2020 17:04:51 -0600
Subject: [PATCH] MC-125757 Fix - Always increment arrow despawn counter
---
src/main/java/net/minecraft/server/EntityArrow.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index 48da1e662..11d1dc876 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -154,6 +154,8 @@ public abstract class EntityArrow extends Entity implements IProjectile {
this.extinguish();
}
+ this.checkDespawnCounter(); // Purpur - moved from below - MC-125757
+
if (this.inGround && !flag) {
if (this.aq != iblockdata && this.world.a(this.getBoundingBox().g(0.06D))) {
this.inGround = false;
@@ -161,7 +163,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
this.despawnCounter = 0;
this.as = 0;
} else if (!this.world.isClientSide) {
- this.i();
+ // this.i(); // Purpur moved up - MC-125757
}
++this.d;
@@ -282,6 +284,7 @@ public abstract class EntityArrow extends Entity implements IProjectile {
}
}
+ protected void checkDespawnCounter() { i(); } // Purpur - OBFHELPER
protected void i() {
++this.despawnCounter;
if (this.despawnCounter >= (fromPlayer == PickupStatus.CREATIVE_ONLY ? world.paperConfig.creativeArrowDespawnRate : (fromPlayer == PickupStatus.DISALLOWED ? world.paperConfig.nonPlayerArrowDespawnRate : ((this instanceof EntityThrownTrident) ? world.spigotConfig.tridentDespawnRate : world.spigotConfig.arrowDespawnRate)))) { // Spigot // Paper - TODO: Extract this to init?
--
2.24.0