diff --git a/patches/server/0740-call-EntityDamageByBlockEvent-for-campfires.patch b/patches/server/0740-call-EntityDamageByBlockEvent-for-campfires.patch new file mode 100644 index 0000000000..42943289ce --- /dev/null +++ b/patches/server/0740-call-EntityDamageByBlockEvent-for-campfires.patch @@ -0,0 +1,20 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Jake Potrebic +Date: Wed, 21 Jul 2021 11:46:28 -0700 +Subject: [PATCH] call EntityDamageByBlockEvent for campfires + + +diff --git a/src/main/java/net/minecraft/world/level/block/CampfireBlock.java b/src/main/java/net/minecraft/world/level/block/CampfireBlock.java +index 2519a0f511f0a6065459cd2fe2d9a3e68e55d222..2c334ce3fc3cf86704dee9397166119a3b5f17e2 100644 +--- a/src/main/java/net/minecraft/world/level/block/CampfireBlock.java ++++ b/src/main/java/net/minecraft/world/level/block/CampfireBlock.java +@@ -93,7 +93,9 @@ public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedB + public void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) { + if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper + if (!entity.fireImmune() && (Boolean) state.getValue(CampfireBlock.LIT) && entity instanceof LivingEntity && !EnchantmentHelper.hasFrostWalker((LivingEntity) entity)) { ++ org.bukkit.craftbukkit.event.CraftEventFactory.blockDamage = org.bukkit.craftbukkit.block.CraftBlock.at(world, pos); // Paper + entity.hurt(DamageSource.IN_FIRE, (float) this.fireDamage); ++ org.bukkit.craftbukkit.event.CraftEventFactory.blockDamage = null; // Paper + } + + super.entityInside(state, world, pos, entity);