2020-06-23 01:09:14 +02:00
|
|
|
From 438b82c82ce806547f9cd780dd5160c5cd9cdd90 Mon Sep 17 00:00:00 2001
|
2020-04-21 14:45:34 +02:00
|
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
|
|
Date: Fri, 21 Feb 2020 17:04:51 -0600
|
|
|
|
Subject: [PATCH] Purpur 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
|
2020-06-16 16:46:05 +02:00
|
|
|
index 4dc53d3fa..3b1b133f9 100644
|
2020-04-21 14:45:34 +02:00
|
|
|
--- a/src/main/java/net/minecraft/server/EntityArrow.java
|
|
|
|
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
|
|
|
|
@@ -147,6 +147,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;
|
|
|
|
@@ -154,7 +156,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;
|
|
|
|
@@ -275,6 +277,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.25.1.windows.1
|
|
|
|
|