PaperMC/paper-server/nms-patches/net/minecraft/world/level/block/BlockCampfire.patch
CraftBukkit/Spigot b3a8254758 Update to Minecraft 1.17
By: md_5 <git@md-5.net>
2021-06-11 15:00:00 +10:00

14 lines
794 B
Diff

--- a/net/minecraft/world/level/block/BlockCampfire.java
+++ b/net/minecraft/world/level/block/BlockCampfire.java
@@ -202,6 +202,11 @@
BlockPosition blockposition = movingobjectpositionblock.getBlockPosition();
if (!world.isClientSide && iprojectile.isBurning() && iprojectile.a(world, blockposition) && !(Boolean) iblockdata.get(BlockCampfire.LIT) && !(Boolean) iblockdata.get(BlockCampfire.WATERLOGGED)) {
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, iprojectile).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockProperties.LIT, true), 11);
}