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

Paper Changes:
70df8f27 Add PrepareGrindstoneEvent
24b2f54b Fix Player skulls for offline mode servers
ce270e14 Updated Upstream (Bukkit/CraftBukkit/Spigot)
c4ada0e1 Fix many chunk loading issues
37b244b5 Fix not running level updates for light if no pre/post task
e6142995 Add and implement PlayerRecipeBookClickEvent (#3351)
9bb4e930 Fix piston dupe patch creating ghost blocks (#3603)
2020-06-23 14:20:44 -05:00

43 lines
2.0 KiB
Diff

From b9d6a9418690fed6b75e7f4ca46dcc7a9fa94200 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 ae44f878f..4ab857853 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.26.2