diff --git a/nms-patches/EntityFireworks.patch b/nms-patches/EntityFireworks.patch index ae3b56acf6..89b3bd1e13 100644 --- a/nms-patches/EntityFireworks.patch +++ b/nms-patches/EntityFireworks.patch @@ -28,7 +28,33 @@ } } -@@ -184,7 +189,9 @@ +@@ -146,7 +151,11 @@ + + protected void a(MovingObjectPosition movingobjectposition) { + if (movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY && !this.world.isClientSide) { +- this.explode(); ++ // CraftBukkit start ++ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callFireworkExplodeEvent(this).isCancelled()) { ++ this.explode(); ++ } ++ // CraftBukkit end + } else if (this.z) { + BlockPosition blockposition; + +@@ -158,7 +167,11 @@ + + this.world.getType(blockposition).a(this.world, blockposition, (Entity) this); + if (this.l()) { +- this.explode(); ++ // CraftBukkit start ++ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callFireworkExplodeEvent(this).isCancelled()) { ++ this.explode(); ++ } ++ // CraftBukkit end + } + } + +@@ -184,7 +197,9 @@ if (f > 0.0F) { if (this.ridingEntity != null) { @@ -38,7 +64,7 @@ } double d0 = 5.0D; -@@ -211,7 +218,9 @@ +@@ -211,7 +226,9 @@ if (flag) { float f1 = f * (float) Math.sqrt((5.0D - (double) this.g(entityliving)) / 5.0D);