mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
65bc2541a3
By: md_5 <git@md-5.net>
23 lines
1.4 KiB
Diff
23 lines
1.4 KiB
Diff
--- a/net/minecraft/world/level/block/BlockCampfire.java
|
|
+++ b/net/minecraft/world/level/block/BlockCampfire.java
|
|
@@ -106,7 +106,7 @@
|
|
@Override
|
|
protected void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
|
|
if ((Boolean) iblockdata.getValue(BlockCampfire.LIT) && entity instanceof EntityLiving && !EnchantmentManager.hasFrostWalker((EntityLiving) entity)) {
|
|
- entity.hurt(world.damageSources().inFire(), (float) this.fireDamage);
|
|
+ entity.hurt(world.damageSources().inFire().directBlock(world, blockposition), (float) this.fireDamage); // CraftBukkit
|
|
}
|
|
|
|
super.entityInside(iblockdata, world, blockposition, entity);
|
|
@@ -216,6 +216,11 @@
|
|
BlockPosition blockposition = movingobjectpositionblock.getBlockPos();
|
|
|
|
if (!world.isClientSide && iprojectile.isOnFire() && iprojectile.mayInteract(world, 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);
|
|
}
|
|
|