Files
Purpur/patches/server/0120-Arrows-should-not-reset-despawn-counter.patch
2021-06-02 20:32:18 -05:00

22 lines
1.2 KiB
Diff

From 0000000000000000000000000000000000000000 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/world/entity/projectile/EntityArrow.java b/src/main/java/net/minecraft/world/entity/projectile/EntityArrow.java
index 5775a28cb9d94b94b6e6bbc810fe31260810632e..7861b9e28b0fcc7ab931498fc7c96404456b9998 100644
--- a/src/main/java/net/minecraft/world/entity/projectile/EntityArrow.java
+++ b/src/main/java/net/minecraft/world/entity/projectile/EntityArrow.java
@@ -281,7 +281,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