SPIGOT-7751: Fix crash caused by arrows from trial spawners
This commit is contained in:
parent
a1d2cd1521
commit
c23daa71f7
@ -109,7 +109,7 @@
|
|||||||
} else {
|
} else {
|
||||||
this.firedFromWeapon = null;
|
this.firedFromWeapon = null;
|
||||||
}
|
}
|
||||||
@@ -627,34 +647,30 @@
|
@@ -627,34 +647,31 @@
|
||||||
Entity entity1 = entity;
|
Entity entity1 = entity;
|
||||||
byte b0 = 0;
|
byte b0 = 0;
|
||||||
|
|
||||||
@ -147,6 +147,7 @@
|
|||||||
|
|
||||||
entityarrow_pickupstatus = EntityArrow.PickupStatus.DISALLOWED;
|
entityarrow_pickupstatus = EntityArrow.PickupStatus.DISALLOWED;
|
||||||
break label16;
|
break label16;
|
||||||
|
+ case null: // SPIGOT-7751: Fix crash caused by null owner
|
||||||
+ default:
|
+ default:
|
||||||
+ entityarrow_pickupstatus = this.pickup;
|
+ entityarrow_pickupstatus = this.pickup;
|
||||||
+ break label16;
|
+ break label16;
|
||||||
@ -155,7 +156,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.pickup = entityarrow_pickupstatus;
|
this.pickup = entityarrow_pickupstatus;
|
||||||
@@ -663,9 +679,24 @@
|
@@ -663,9 +680,24 @@
|
||||||
@Override
|
@Override
|
||||||
public void playerTouch(EntityHuman entityhuman) {
|
public void playerTouch(EntityHuman entityhuman) {
|
||||||
if (!this.level().isClientSide && (this.inGround || this.isNoPhysics()) && this.shakeTime <= 0) {
|
if (!this.level().isClientSide && (this.inGround || this.isNoPhysics()) && this.shakeTime <= 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user