SPIGOT-7751: Fix crash caused by arrows from trial spawners

By: Jishuna <joshl5324@gmail.com>
This commit is contained in:
CraftBukkit/Spigot 2024-06-14 10:14:27 -04:00
parent 3e0c06d5c6
commit 17fc7c0926

View File

@ -109,7 +109,7 @@
} else {
this.firedFromWeapon = null;
}
@@ -627,34 +647,30 @@
@@ -627,34 +647,31 @@
Entity entity1 = entity;
byte b0 = 0;
@ -147,6 +147,7 @@
entityarrow_pickupstatus = EntityArrow.PickupStatus.DISALLOWED;
break label16;
+ case null: // SPIGOT-7751: Fix crash caused by null owner
+ default:
+ entityarrow_pickupstatus = this.pickup;
+ break label16;
@ -155,7 +156,7 @@
}
this.pickup = entityarrow_pickupstatus;
@@ -663,9 +679,24 @@
@@ -663,9 +680,24 @@
@Override
public void playerTouch(EntityHuman entityhuman) {
if (!this.level().isClientSide && (this.inGround || this.isNoPhysics()) && this.shakeTime <= 0) {