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

Paper Changes:
fcbeac8a [CI-SKIP] Readme update (#3702)
824f8086 Bandaid italic legacy serialization #3757 (#3760)

Tuinity Changes:
9f21359: Re-add optimise collision checking in player move packet handling
1152054: Revert player move packet optimisation
ef0a6c4: Optimise collision checking in player move packets
2020-07-02 20:38:04 -05:00

34 lines
1.6 KiB
Diff

From 0000000000000000000000000000000000000000 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
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index 6195a45e3..ffa5ed69c 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -124,11 +124,13 @@ public abstract class EntityArrow extends IProjectile {
this.extinguish();
}
+ this.checkDespawnCounter(); // Purpur - moved from below - MC-125757
+
if (this.inGround && !flag) {
if (this.an != iblockdata && this.u()) {
this.z();
} else if (!this.world.isClientSide) {
- this.h();
+ // this.h(); // Purpur - moved up MC-125757
}
++this.c;
@@ -254,6 +256,7 @@ public abstract class EntityArrow extends IProjectile {
}
+ protected void checkDespawnCounter() { h(); } // Purpur - OBFHELPER
protected void h() {
++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?