From bfa7716ca19993c59912b4fbba1c1d2f23c96061 Mon Sep 17 00:00:00 2001 From: CraftBukkit/Spigot Date: Wed, 30 Jun 2021 18:56:27 +1000 Subject: [PATCH] SPIGOT-6613: Missing BlockIgniteEvent for candles + projectiles By: md_5 --- .../world/level/block/AbstractCandleBlock.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 paper-server/nms-patches/net/minecraft/world/level/block/AbstractCandleBlock.patch diff --git a/paper-server/nms-patches/net/minecraft/world/level/block/AbstractCandleBlock.patch b/paper-server/nms-patches/net/minecraft/world/level/block/AbstractCandleBlock.patch new file mode 100644 index 0000000000..4a5c5ff380 --- /dev/null +++ b/paper-server/nms-patches/net/minecraft/world/level/block/AbstractCandleBlock.patch @@ -0,0 +1,14 @@ +--- a/net/minecraft/world/level/block/AbstractCandleBlock.java ++++ b/net/minecraft/world/level/block/AbstractCandleBlock.java +@@ -39,6 +39,11 @@ + @Override + public void a(World world, IBlockData iblockdata, MovingObjectPositionBlock movingobjectpositionblock, IProjectile iprojectile) { + if (!world.isClientSide && iprojectile.isBurning() && this.c(iblockdata)) { ++ // CraftBukkit start ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, movingobjectpositionblock.getBlockPosition(), iprojectile).isCancelled()) { ++ return; ++ } ++ // CraftBukkit end + a(world, iblockdata, movingobjectpositionblock.getBlockPosition(), true); + } +