From a43bb368d0878da8d20835adf009150f578252f0 Mon Sep 17 00:00:00 2001 From: William Blake Galbreath Date: Wed, 4 Nov 2020 13:14:59 -0600 Subject: [PATCH] Arrows should not reset despawn counter --- ...ows-should-not-reset-despawn-counter.patch | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 patches/server/0139-Arrows-should-not-reset-despawn-counter.patch diff --git a/patches/server/0139-Arrows-should-not-reset-despawn-counter.patch b/patches/server/0139-Arrows-should-not-reset-despawn-counter.patch new file mode 100644 index 000000000..c1afd5a15 --- /dev/null +++ b/patches/server/0139-Arrows-should-not-reset-despawn-counter.patch @@ -0,0 +1,21 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: William Blake Galbreath +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 7f89b269e3..7814c24367 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