From d3c9a195cb5778e99ea120ed4fea12fbf57abb97 Mon Sep 17 00:00:00 2001 From: Jake Potrebic <15055071+Machine-Maker@users.noreply.github.com> Date: Tue, 18 May 2021 08:54:12 -0700 Subject: [PATCH] removed duplicate ProjectileHitEvent for fireball (#5671) --- ...ve-ProjectileHitEvent-call-when-fireballs-dead.patch} | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) rename Spigot-Server-Patches/{0649-Respect-ProjectileHitEvent-cancel-where-missing.patch => 0649-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch} (65%) diff --git a/Spigot-Server-Patches/0649-Respect-ProjectileHitEvent-cancel-where-missing.patch b/Spigot-Server-Patches/0649-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch similarity index 65% rename from Spigot-Server-Patches/0649-Respect-ProjectileHitEvent-cancel-where-missing.patch rename to Spigot-Server-Patches/0649-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch index cf1af3ddff..21e396674c 100644 --- a/Spigot-Server-Patches/0649-Respect-ProjectileHitEvent-cancel-where-missing.patch +++ b/Spigot-Server-Patches/0649-Remove-ProjectileHitEvent-call-when-fireballs-dead.patch @@ -1,12 +1,13 @@ From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 From: Aikar Date: Sat, 16 Jan 2021 14:30:12 -0500 -Subject: [PATCH] Respect ProjectileHitEvent cancel where missing +Subject: [PATCH] Remove ProjectileHitEvent call when fireballs dead -The duplicate ProjectileHitEvent in EntityFireball was not cancelled +The duplicate ProjectileHitEvent in EntityFireball was removed. The +event was always called before the duplicate call. 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 9660dc2263c48a5818b767843658eeb9ee1748ea..243b24e7c304b379aeb925fe1e2435853f80397d 100644 +index 9660dc2263c48a5818b767843658eeb9ee1748ea..ba3b52691db79c83d4482664b7a9615ab9be2761 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/EntityFireball.java +++ b/src/main/java/net/minecraft/world/entity/projectile/EntityFireball.java @@ -87,7 +87,7 @@ public abstract class EntityFireball extends IProjectile { @@ -14,7 +15,7 @@ index 9660dc2263c48a5818b767843658eeb9ee1748ea..243b24e7c304b379aeb925fe1e243585 // CraftBukkit start - Fire ProjectileHitEvent if (this.dead) { - CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); -+ if (CraftEventFactory.callProjectileHitEvent(this, movingobjectposition).isCancelled()) return; // Paper - this is an undesired duplicate event, but make cancellable ++ // CraftEventFactory.callProjectileHitEvent(this, movingobjectposition); // Paper - this is an undesired duplicate event } // CraftBukkit end }