mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-21 18:37:42 +01:00
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)
This commit is contained in:
committed by
granny
parent
9630600d0c
commit
55dc415e72
@@ -0,0 +1,11 @@
|
||||
--- a/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
+++ b/net/minecraft/world/entity/projectile/AbstractArrow.java
|
||||
@@ -347,7 +_,7 @@
|
||||
this.setInGround(false);
|
||||
Vec3 deltaMovement = this.getDeltaMovement();
|
||||
this.setDeltaMovement(deltaMovement.multiply(this.random.nextFloat() * 0.2F, this.random.nextFloat() * 0.2F, this.random.nextFloat() * 0.2F));
|
||||
- this.life = 0;
|
||||
+ if (this.level().purpurConfig.arrowMovementResetsDespawnCounter) this.life = 0; // Purpur - Arrows should not reset despawn counter
|
||||
}
|
||||
|
||||
public boolean isInGround() { // Paper - protected -> public
|
||||
Reference in New Issue
Block a user