Files
Purpur/patches/server/0131-Arrows-should-not-reset-despawn-counter.patch
BillyGalbreath ef0b93df2e Rebuild patches
2020-12-12 18:19:48 -06:00

22 lines
1.1 KiB
Diff

From b715fcf66527bc32f71d60aa545cab9bcc62a72e Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <Blake.Galbreath@GMail.com>
Date: Wed, 4 Nov 2020 13:12:50 -0600
Subject: [PATCH] Arrows should not reset despawn counter
This prevents keeping arrows alive indefinitely (such as when the block
the arrow is stuck in gets removed, like a piston head going up/down)
diff --git a/src/main/java/net/minecraft/server/EntityArrow.java b/src/main/java/net/minecraft/server/EntityArrow.java
index 7f89b269e37e1046a64c62e1db2a37e6aa4cd54c..5ec8c9484de64b956ec31b578a2a337340d70339 100644
--- a/src/main/java/net/minecraft/server/EntityArrow.java
+++ b/src/main/java/net/minecraft/server/EntityArrow.java
@@ -243,7 +243,7 @@ public abstract class EntityArrow extends IProjectile {
Vec3D vec3d = this.getMot();
this.setMot(vec3d.d((double) (this.random.nextFloat() * 0.2F), (double) (this.random.nextFloat() * 0.2F), (double) (this.random.nextFloat() * 0.2F)));
- this.despawnCounter = 0;
+ // this.despawnCounter = 0; // Purpur - do not reset despawn counter
}
@Override