mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-20 18:07:43 +01:00
27 lines
1.4 KiB
Diff
27 lines
1.4 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 6195a45e30..962a558070 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityArrow.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
|
|
@@ -133,6 +133,7 @@ public abstract class EntityArrow extends IProjectile {
|
|
|
|
++this.c;
|
|
} else {
|
|
+ if (ticksLived > 200) this.checkDespawnCounter(); // Purpur - tick despawn counter after 10 seconds. fixes MC-125757
|
|
this.c = 0;
|
|
Vec3D vec3d2 = this.getPositionVector();
|
|
|
|
@@ -254,6 +255,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?
|