2020-07-10 02:40:37 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
|
|
|
|
Date: Wed, 8 Jul 2020 11:24:30 -0500
|
|
|
|
Subject: [PATCH] Fix arrows never despawning MC-125757
|
|
|
|
|
|
|
|
This forces the despawn counter to start ticking regardless of
|
|
|
|
state after the arrow has been alive for 200 ticks (10 seconds)
|
|
|
|
instead of getting stuck in a never despawn state (bubble columns,
|
|
|
|
etc).
|
|
|
|
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
|
2020-08-02 07:39:36 +02:00
|
|
|
index f8772a853ea9b5ca45c78a2fd8bd3f1fa6abf5d2..0d43eb8e1712d1b98888db7579bc343ccb1e8989 100644
|
2020-07-10 02:40:37 +02:00
|
|
|
--- 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.tickDespawnCounter(); // Paper - tick despawnCounter regardless after 10 seconds
|
|
|
|
this.c = 0;
|
|
|
|
Vec3D vec3d2 = this.getPositionVector();
|
|
|
|
|
|
|
|
@@ -254,6 +255,7 @@ public abstract class EntityArrow extends IProjectile {
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2020-08-02 07:39:36 +02:00
|
|
|
+ protected final void tickDespawnCounter() { this.h(); } // Paper - OBFHELPER
|
2020-07-10 02:40:37 +02:00
|
|
|
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?
|