diff options
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/CampfireBlock.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/CampfireBlock.java.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/CampfireBlock.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/CampfireBlock.java.patch new file mode 100644 index 0000000000..1fc979024f --- /dev/null +++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/CampfireBlock.java.patch @@ -0,0 +1,43 @@ +--- a/net/minecraft/world/level/block/CampfireBlock.java ++++ b/net/minecraft/world/level/block/CampfireBlock.java +@@ -49,6 +49,9 @@ + import net.minecraft.world.phys.shapes.CollisionContext; + import net.minecraft.world.phys.shapes.Shapes; + import net.minecraft.world.phys.shapes.VoxelShape; ++// CraftBukkit start ++import org.bukkit.craftbukkit.block.CraftBlock; ++// CraftBukkit end + + public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedBlock { + +@@ -106,10 +107,11 @@ + } + + @Override +- @Override +- public void entityInside(BlockState blockstate, Level level, BlockPos blockpos, Entity entity) { +- if ((Boolean) blockstate.getValue(CampfireBlock.LIT) && entity instanceof LivingEntity && !EnchantmentHelper.hasFrostWalker((LivingEntity) entity)) { ++ public void entityInside(IBlockData state, Level level, BlockPos pos, Entity entity) { ++ if ((Boolean) state.getValue(CampfireBlock.LIT) && entity instanceof LivingEntity && !EnchantmentHelper.hasFrostWalker((LivingEntity) entity)) { ++ org.bukkit.craftbukkit.event.CraftEventFactory.blockDamage = CraftBlock.at(level, pos); // CraftBukkit + entity.hurt(level.damageSources().inFire(), (float) this.fireDamage); ++ org.bukkit.craftbukkit.event.CraftEventFactory.blockDamage = null; // CraftBukkit + } + + super.entityInside(blockstate, level, blockpos, entity); +@@ -226,8 +220,13 @@ + public void onProjectileHit(Level level, BlockState blockstate, BlockHitResult blockhitresult, Projectile projectile) { + BlockPos blockpos = blockhitresult.getBlockPos(); + +- if (!level.isClientSide && projectile.isOnFire() && projectile.mayInteract(level, blockpos) && !(Boolean) blockstate.getValue(CampfireBlock.LIT) && !(Boolean) blockstate.getValue(CampfireBlock.WATERLOGGED)) { +- level.setBlock(blockpos, (BlockState) blockstate.setValue(BlockStateProperties.LIT, true), 11); ++ if (!level.isClientSide && projectile.isOnFire() && projectile.mayInteract(level, blockposition) && !(Boolean) state.getValue(CampfireBlock.LIT) && !(Boolean) state.getValue(CampfireBlock.WATERLOGGED)) { ++ // CraftBukkit start ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(level, blockposition, projectile).isCancelled()) { ++ return; ++ } ++ // CraftBukkit end ++ level.setBlock(blockposition, (IBlockData) state.setValue(BlockStateProperties.LIT, true), 11); + } + + } |