Updated Upstream (Bukkit/CraftBukkit/Spigot) (#5601)

This commit is contained in:
Jake Potrebic
2021-05-09 13:50:09 -07:00
parent bb125aaccf
commit 4d8954ef25
11 changed files with 31 additions and 118 deletions

View File

@@ -24,7 +24,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper end
+
if (object != null && !flag) {
this.a((MovingObjectPosition) object);
this.preOnHit((MovingObjectPosition) object); // CraftBukkit - projectile hit event
this.impulse = true;
diff --git a/src/main/java/net/minecraft/world/entity/projectile/EntityFireball.java b/src/main/java/net/minecraft/world/entity/projectile/EntityFireball.java
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
@@ -53,7 +53,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ // Paper end
+
+ if (movingobjectposition != null && movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) { // Paper - add null check in case cancelled
this.a(movingobjectposition);
this.preOnHit(movingobjectposition); // CraftBukkit - projectile hit event
// CraftBukkit start - Fire ProjectileHitEvent
diff --git a/src/main/java/net/minecraft/world/entity/projectile/EntityProjectile.java b/src/main/java/net/minecraft/world/entity/projectile/EntityProjectile.java
@@ -81,7 +81,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+ }
+ if (movingobjectposition != null) {
+ // Paper end
this.a(movingobjectposition);
this.preOnHit(movingobjectposition); // CraftBukkit - projectile hit event
+ } // Paper
}