0
0
mirror of https://hub.spigotmc.org/stash/scm/spigot/craftbukkit.git synced 2024-11-25 13:56:14 +00:00
craftbukkit/nms-patches/net/minecraft/world/level/block/AbstractCandleBlock.patch
2024-10-23 02:15:00 +11:00

15 lines
772 B
Diff

--- a/net/minecraft/world/level/block/AbstractCandleBlock.java
+++ b/net/minecraft/world/level/block/AbstractCandleBlock.java
@@ -47,6 +47,11 @@
@Override
protected void onProjectileHit(World world, IBlockData iblockdata, MovingObjectPositionBlock movingobjectpositionblock, IProjectile iprojectile) {
if (!world.isClientSide && iprojectile.isOnFire() && this.canBeLit(iblockdata)) {
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, movingobjectpositionblock.getBlockPos(), iprojectile).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
setLit(world, iblockdata, movingobjectpositionblock.getBlockPos(), true);
}