--- a/net/minecraft/world/item/FireChargeItem.java +++ b/net/minecraft/world/item/FireChargeItem.java @@ -40,12 +40,28 @@ if (!CampfireBlock.canLight(iblockdata) && !CandleBlock.canLight(iblockdata) && !CandleCakeBlock.canLight(iblockdata)) { blockposition = blockposition.relative(context.getClickedFace()); if (BaseFireBlock.canBePlacedAt(world, blockposition, context.getHorizontalDirection())) { + // CraftBukkit start - fire BlockIgniteEvent + if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, org.bukkit.event.block.BlockIgniteEvent.IgniteCause.FIREBALL, context.getPlayer()).isCancelled()) { + if (!context.getPlayer().getAbilities().instabuild) { + context.getItemInHand().shrink(1); + } + return InteractionResult.PASS; + } + // CraftBukkit end this.playSound(world, blockposition); world.setBlockAndUpdate(blockposition, BaseFireBlock.getState(world, blockposition)); world.gameEvent((Entity) context.getPlayer(), (Holder) GameEvent.BLOCK_PLACE, blockposition); flag = true; } } else { + // CraftBukkit start - fire BlockIgniteEvent + if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, org.bukkit.event.block.BlockIgniteEvent.IgniteCause.FIREBALL, context.getPlayer()).isCancelled()) { + if (!context.getPlayer().getAbilities().instabuild) { + context.getItemInHand().shrink(1); + } + return InteractionResult.PASS; + } + // CraftBukkit end this.playSound(world, blockposition); world.setBlockAndUpdate(blockposition, (BlockState) iblockdata.setValue(BlockStateProperties.LIT, true)); world.gameEvent((Entity) context.getPlayer(), (Holder) GameEvent.BLOCK_CHANGE, blockposition);