2025-03-26 03:05:00 +11:00

24 lines
1.4 KiB
Diff

--- a/net/minecraft/world/level/block/BlockCampfire.java
+++ b/net/minecraft/world/level/block/BlockCampfire.java
@@ -113,7 +113,7 @@
@Override
protected void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity, InsideBlockEffectApplier insideblockeffectapplier) {
if ((Boolean) iblockdata.getValue(BlockCampfire.LIT) && entity instanceof EntityLiving) {
- entity.hurt(world.damageSources().campfire(), (float) this.fireDamage);
+ entity.hurt(world.damageSources().campfire().directBlock(world, blockposition), (float) this.fireDamage); // CraftBukkit
}
super.entityInside(iblockdata, world, blockposition, entity, insideblockeffectapplier);
@@ -200,6 +200,11 @@
if (world instanceof WorldServer worldserver) {
if (iprojectile.isOnFire() && iprojectile.mayInteract(worldserver, blockposition) && !(Boolean) iblockdata.getValue(BlockCampfire.LIT) && !(Boolean) iblockdata.getValue(BlockCampfire.WATERLOGGED)) {
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, iprojectile).isCancelled()) {
+ return;
+ }
+ // CraftBukkit end
world.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockProperties.LIT, true), 11);
}
}