Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,19 @@
}

public void setSoundEvent(SoundEvent soundEvent) {
@@ -146,7 +_,11 @@
@Override
public void lerpMotion(Vec3 movement) {
super.lerpMotion(movement);
- this.life = 0;
+ // Paper start - Fix loophole for arrow immunity
+ if (!this.level().paperConfig().entities.spawning.maxArrowDespawnInvulnerability.enabled()) {
+ this.life = 0;
+ }
+ // Paper end - Fix loophole for arrow immunity
if (this.isInGround() && movement.lengthSqr() > 0.0) {
this.setInGround(false);
}
@@ -207,6 +_,10 @@
this.setSharedFlagOnFire(this.getRemainingFireTicks() > 0);
}
Expand Down Expand Up @@ -55,7 +68,7 @@
if (!this.isAlive() || projectileDeflection != ProjectileDeflection.NONE) {
return projectileDeflection;
}
@@ -325,13 +_,26 @@
@@ -325,20 +_,37 @@
}
}

Expand Down Expand Up @@ -83,6 +96,18 @@
}

private void startFalling() {
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;
+ // Paper start - Fix loophole for arrow immunity
+ if (!this.level().paperConfig().entities.spawning.maxArrowDespawnInvulnerability.enabled()) {
+ this.life = 0;
+ }
+ // Paper end - Fix loophole for arrow immunity
}

public boolean isInGround() {
@@ -364,8 +_,8 @@

protected void tickDespawn() {
Expand Down
Loading