From c23daa71f7086d83a8c8cf6584cf1636f965371a Mon Sep 17 00:00:00 2001 From: Jishuna Date: Fri, 14 Jun 2024 10:14:27 -0400 Subject: [PATCH] SPIGOT-7751: Fix crash caused by arrows from trial spawners --- .../net/minecraft/world/entity/projectile/EntityArrow.patch | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nms-patches/net/minecraft/world/entity/projectile/EntityArrow.patch b/nms-patches/net/minecraft/world/entity/projectile/EntityArrow.patch index 91418fa8a..7788760b8 100644 --- a/nms-patches/net/minecraft/world/entity/projectile/EntityArrow.patch +++ b/nms-patches/net/minecraft/world/entity/projectile/EntityArrow.patch @@ -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) {