--- a/net/minecraft/world/level/block/CampfireBlock.java
+++ b/net/minecraft/world/level/block/CampfireBlock.java
@@ -37,6 +37,7 @@
 import net.minecraft.world.level.block.state.properties.BooleanProperty;
 import net.minecraft.world.level.block.state.properties.DirectionProperty;
 import net.minecraft.world.level.gameevent.GameEvent;
+import net.minecraft.world.level.material.Fluid;
 import net.minecraft.world.level.material.FluidState;
 import net.minecraft.world.level.material.Fluids;
 import net.minecraft.world.level.pathfinder.PathComputationType;
@@ -45,8 +46,12 @@
 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.v1_19_R1.block.CraftBlock;
+// CraftBukkit end
 
 public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedBlock {
+
     protected static final VoxelShape SHAPE = Block.box(0.0D, 0.0D, 0.0D, 16.0D, 7.0D, 16.0D);
     public static final BooleanProperty LIT = BlockStateProperties.LIT;
     public static final BooleanProperty SIGNAL_FIRE = BlockStateProperties.SIGNAL_FIRE;
@@ -61,17 +66,20 @@
         super(settings);
         this.spawnParticles = emitsParticles;
         this.fireDamage = fireDamage;
-        this.registerDefaultState(this.stateDefinition.any().setValue(LIT, Boolean.valueOf(true)).setValue(SIGNAL_FIRE, Boolean.valueOf(false)).setValue(WATERLOGGED, Boolean.valueOf(false)).setValue(FACING, Direction.NORTH));
+        this.registerDefaultState((BlockState) ((BlockState) ((BlockState) ((BlockState) ((BlockState) this.stateDefinition.any()).setValue(CampfireBlock.LIT, true)).setValue(CampfireBlock.SIGNAL_FIRE, false)).setValue(CampfireBlock.WATERLOGGED, false)).setValue(CampfireBlock.FACING, Direction.NORTH));
     }
 
     @Override
     public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
-        BlockEntity blockEntity = world.getBlockEntity(pos);
-        if (blockEntity instanceof CampfireBlockEntity campfireBlockEntity) {
-            ItemStack itemStack = player.getItemInHand(hand);
-            Optional<CampfireCookingRecipe> optional = campfireBlockEntity.getCookableRecipe(itemStack);
+        BlockEntity tileentity = world.getBlockEntity(pos);
+
+        if (tileentity instanceof CampfireBlockEntity) {
+            CampfireBlockEntity tileentitycampfire = (CampfireBlockEntity) tileentity;
+            ItemStack itemstack = player.getItemInHand(hand);
+            Optional<CampfireCookingRecipe> optional = tileentitycampfire.getCookableRecipe(itemstack);
+
             if (optional.isPresent()) {
-                if (!world.isClientSide && campfireBlockEntity.placeFood(player, player.getAbilities().instabuild ? itemStack.copy() : itemStack, optional.get().getCookingTime())) {
+                if (!world.isClientSide && tileentitycampfire.placeFood(player, player.getAbilities().instabuild ? itemstack.copy() : itemstack, ((CampfireCookingRecipe) optional.get()).getCookingTime())) {
                     player.awardStat(Stats.INTERACT_WITH_CAMPFIRE);
                     return InteractionResult.SUCCESS;
                 }
@@ -85,8 +93,11 @@
 
     @Override
     public void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
-        if (state.getValue(LIT) && entity instanceof LivingEntity && !EnchantmentHelper.hasFrostWalker((LivingEntity)entity)) {
-            entity.hurt(DamageSource.IN_FIRE, (float)this.fireDamage);
+        if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.v1_19_R1.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper
+        if ((Boolean) state.getValue(CampfireBlock.LIT) && entity instanceof LivingEntity && !EnchantmentHelper.hasFrostWalker((LivingEntity) entity)) {
+            org.bukkit.craftbukkit.v1_19_R1.event.CraftEventFactory.blockDamage = CraftBlock.at(world, pos); // CraftBukkit
+            entity.hurt(DamageSource.IN_FIRE, (float) this.fireDamage);
+            org.bukkit.craftbukkit.v1_19_R1.event.CraftEventFactory.blockDamage = null; // CraftBukkit
         }
 
         super.entityInside(state, world, pos, entity);
@@ -95,9 +106,10 @@
     @Override
     public void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean moved) {
         if (!state.is(newState.getBlock())) {
-            BlockEntity blockEntity = world.getBlockEntity(pos);
-            if (blockEntity instanceof CampfireBlockEntity) {
-                Containers.dropContents(world, pos, ((CampfireBlockEntity)blockEntity).getItems());
+            BlockEntity tileentity = world.getBlockEntity(pos);
+
+            if (tileentity instanceof CampfireBlockEntity) {
+                Containers.dropContents(world, pos, ((CampfireBlockEntity) tileentity).getItems());
             }
 
             super.onRemove(state, world, pos, newState, moved);
@@ -107,19 +119,20 @@
     @Nullable
     @Override
     public BlockState getStateForPlacement(BlockPlaceContext ctx) {
-        LevelAccessor levelAccessor = ctx.getLevel();
-        BlockPos blockPos = ctx.getClickedPos();
-        boolean bl = levelAccessor.getFluidState(blockPos).getType() == Fluids.WATER;
-        return this.defaultBlockState().setValue(WATERLOGGED, Boolean.valueOf(bl)).setValue(SIGNAL_FIRE, Boolean.valueOf(this.isSmokeSource(levelAccessor.getBlockState(blockPos.below())))).setValue(LIT, Boolean.valueOf(!bl)).setValue(FACING, ctx.getHorizontalDirection());
+        Level world = ctx.getLevel();
+        BlockPos blockposition = ctx.getClickedPos();
+        boolean flag = world.getFluidState(blockposition).getType() == Fluids.WATER;
+
+        return (BlockState) ((BlockState) ((BlockState) ((BlockState) this.defaultBlockState().setValue(CampfireBlock.WATERLOGGED, flag)).setValue(CampfireBlock.SIGNAL_FIRE, this.isSmokeSource(world.getBlockState(blockposition.below())))).setValue(CampfireBlock.LIT, !flag)).setValue(CampfireBlock.FACING, ctx.getHorizontalDirection());
     }
 
     @Override
     public BlockState updateShape(BlockState state, Direction direction, BlockState neighborState, LevelAccessor world, BlockPos pos, BlockPos neighborPos) {
-        if (state.getValue(WATERLOGGED)) {
-            world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world));
+        if ((Boolean) state.getValue(CampfireBlock.WATERLOGGED)) {
+            world.scheduleTick(pos, (Fluid) Fluids.WATER, Fluids.WATER.getTickDelay(world));
         }
 
-        return direction == Direction.DOWN ? state.setValue(SIGNAL_FIRE, Boolean.valueOf(this.isSmokeSource(neighborState))) : super.updateShape(state, direction, neighborState, world, pos, neighborPos);
+        return direction == Direction.DOWN ? (BlockState) state.setValue(CampfireBlock.SIGNAL_FIRE, this.isSmokeSource(neighborState)) : super.updateShape(state, direction, neighborState, world, pos, neighborPos);
     }
 
     private boolean isSmokeSource(BlockState state) {
@@ -128,7 +141,7 @@
 
     @Override
     public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
-        return SHAPE;
+        return CampfireBlock.SHAPE;
     }
 
     @Override
@@ -138,14 +151,14 @@
 
     @Override
     public void animateTick(BlockState state, Level world, BlockPos pos, RandomSource random) {
-        if (state.getValue(LIT)) {
+        if ((Boolean) state.getValue(CampfireBlock.LIT)) {
             if (random.nextInt(10) == 0) {
-                world.playLocalSound((double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, SoundEvents.CAMPFIRE_CRACKLE, SoundSource.BLOCKS, 0.5F + random.nextFloat(), random.nextFloat() * 0.7F + 0.6F, false);
+                world.playLocalSound((double) pos.getX() + 0.5D, (double) pos.getY() + 0.5D, (double) pos.getZ() + 0.5D, SoundEvents.CAMPFIRE_CRACKLE, SoundSource.BLOCKS, 0.5F + random.nextFloat(), random.nextFloat() * 0.7F + 0.6F, false);
             }
 
             if (this.spawnParticles && random.nextInt(5) == 0) {
-                for(int i = 0; i < random.nextInt(1) + 1; ++i) {
-                    world.addParticle(ParticleTypes.LAVA, (double)pos.getX() + 0.5D, (double)pos.getY() + 0.5D, (double)pos.getZ() + 0.5D, (double)(random.nextFloat() / 2.0F), 5.0E-5D, (double)(random.nextFloat() / 2.0F));
+                for (int i = 0; i < random.nextInt(1) + 1; ++i) {
+                    world.addParticle(ParticleTypes.LAVA, (double) pos.getX() + 0.5D, (double) pos.getY() + 0.5D, (double) pos.getZ() + 0.5D, (double) (random.nextFloat() / 2.0F), 5.0E-5D, (double) (random.nextFloat() / 2.0F));
                 }
             }
 
@@ -154,14 +167,15 @@
 
     public static void dowse(@Nullable Entity entity, LevelAccessor world, BlockPos pos, BlockState state) {
         if (world.isClientSide()) {
-            for(int i = 0; i < 20; ++i) {
-                makeParticles((Level)world, pos, state.getValue(SIGNAL_FIRE), true);
+            for (int i = 0; i < 20; ++i) {
+                CampfireBlock.makeParticles((Level) world, pos, (Boolean) state.getValue(CampfireBlock.SIGNAL_FIRE), true);
             }
         }
 
-        BlockEntity blockEntity = world.getBlockEntity(pos);
-        if (blockEntity instanceof CampfireBlockEntity) {
-            ((CampfireBlockEntity)blockEntity).dowse();
+        BlockEntity tileentity = world.getBlockEntity(pos);
+
+        if (tileentity instanceof CampfireBlockEntity) {
+            ((CampfireBlockEntity) tileentity).dowse();
         }
 
         world.gameEvent(entity, GameEvent.BLOCK_CHANGE, pos);
@@ -169,17 +183,18 @@
 
     @Override
     public boolean placeLiquid(LevelAccessor world, BlockPos pos, BlockState state, FluidState fluidState) {
-        if (!state.getValue(BlockStateProperties.WATERLOGGED) && fluidState.getType() == Fluids.WATER) {
-            boolean bl = state.getValue(LIT);
-            if (bl) {
+        if (!(Boolean) state.getValue(BlockStateProperties.WATERLOGGED) && fluidState.getType() == Fluids.WATER) {
+            boolean flag = (Boolean) state.getValue(CampfireBlock.LIT);
+
+            if (flag) {
                 if (!world.isClientSide()) {
-                    world.playSound((Player)null, pos, SoundEvents.GENERIC_EXTINGUISH_FIRE, SoundSource.BLOCKS, 1.0F, 1.0F);
+                    world.playSound((Player) null, pos, SoundEvents.GENERIC_EXTINGUISH_FIRE, SoundSource.BLOCKS, 1.0F, 1.0F);
                 }
 
-                dowse((Entity)null, world, pos, state);
+                CampfireBlock.dowse((Entity) null, world, pos, state);
             }
 
-            world.setBlock(pos, state.setValue(WATERLOGGED, Boolean.valueOf(true)).setValue(LIT, Boolean.valueOf(false)), 3);
+            world.setBlock(pos, (BlockState) ((BlockState) state.setValue(CampfireBlock.WATERLOGGED, true)).setValue(CampfireBlock.LIT, false), 3);
             world.scheduleTick(pos, fluidState.getType(), fluidState.getType().getTickDelay(world));
             return true;
         } else {
@@ -189,35 +204,45 @@
 
     @Override
     public void onProjectileHit(Level world, BlockState state, BlockHitResult hit, Projectile projectile) {
-        BlockPos blockPos = hit.getBlockPos();
-        if (!world.isClientSide && projectile.isOnFire() && projectile.mayInteract(world, blockPos) && !state.getValue(LIT) && !state.getValue(WATERLOGGED)) {
-            world.setBlock(blockPos, state.setValue(BlockStateProperties.LIT, Boolean.valueOf(true)), 11);
+        BlockPos blockposition = hit.getBlockPos();
+
+        if (!world.isClientSide && projectile.isOnFire() && projectile.mayInteract(world, blockposition) && !(Boolean) state.getValue(CampfireBlock.LIT) && !(Boolean) state.getValue(CampfireBlock.WATERLOGGED)) {
+            // CraftBukkit start
+            if (org.bukkit.craftbukkit.v1_19_R1.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, projectile).isCancelled()) {
+                return;
+            }
+            // CraftBukkit end
+            world.setBlock(blockposition, (BlockState) state.setValue(BlockStateProperties.LIT, true), 11);
         }
 
     }
 
     public static void makeParticles(Level world, BlockPos pos, boolean isSignal, boolean lotsOfSmoke) {
-        RandomSource randomSource = world.getRandom();
-        SimpleParticleType simpleParticleType = isSignal ? ParticleTypes.CAMPFIRE_SIGNAL_SMOKE : ParticleTypes.CAMPFIRE_COSY_SMOKE;
-        world.addAlwaysVisibleParticle(simpleParticleType, true, (double)pos.getX() + 0.5D + randomSource.nextDouble() / 3.0D * (double)(randomSource.nextBoolean() ? 1 : -1), (double)pos.getY() + randomSource.nextDouble() + randomSource.nextDouble(), (double)pos.getZ() + 0.5D + randomSource.nextDouble() / 3.0D * (double)(randomSource.nextBoolean() ? 1 : -1), 0.0D, 0.07D, 0.0D);
+        RandomSource randomsource = world.getRandom();
+        SimpleParticleType particletype = isSignal ? ParticleTypes.CAMPFIRE_SIGNAL_SMOKE : ParticleTypes.CAMPFIRE_COSY_SMOKE;
+
+        world.addAlwaysVisibleParticle(particletype, true, (double) pos.getX() + 0.5D + randomsource.nextDouble() / 3.0D * (double) (randomsource.nextBoolean() ? 1 : -1), (double) pos.getY() + randomsource.nextDouble() + randomsource.nextDouble(), (double) pos.getZ() + 0.5D + randomsource.nextDouble() / 3.0D * (double) (randomsource.nextBoolean() ? 1 : -1), 0.0D, 0.07D, 0.0D);
         if (lotsOfSmoke) {
-            world.addParticle(ParticleTypes.SMOKE, (double)pos.getX() + 0.5D + randomSource.nextDouble() / 4.0D * (double)(randomSource.nextBoolean() ? 1 : -1), (double)pos.getY() + 0.4D, (double)pos.getZ() + 0.5D + randomSource.nextDouble() / 4.0D * (double)(randomSource.nextBoolean() ? 1 : -1), 0.0D, 0.005D, 0.0D);
+            world.addParticle(ParticleTypes.SMOKE, (double) pos.getX() + 0.5D + randomsource.nextDouble() / 4.0D * (double) (randomsource.nextBoolean() ? 1 : -1), (double) pos.getY() + 0.4D, (double) pos.getZ() + 0.5D + randomsource.nextDouble() / 4.0D * (double) (randomsource.nextBoolean() ? 1 : -1), 0.0D, 0.005D, 0.0D);
         }
 
     }
 
     public static boolean isSmokeyPos(Level world, BlockPos pos) {
-        for(int i = 1; i <= 5; ++i) {
-            BlockPos blockPos = pos.below(i);
-            BlockState blockState = world.getBlockState(blockPos);
-            if (isLitCampfire(blockState)) {
+        for (int i = 1; i <= 5; ++i) {
+            BlockPos blockposition1 = pos.below(i);
+            BlockState iblockdata = world.getBlockState(blockposition1);
+
+            if (CampfireBlock.isLitCampfire(iblockdata)) {
                 return true;
             }
 
-            boolean bl = Shapes.joinIsNotEmpty(VIRTUAL_FENCE_POST, blockState.getCollisionShape(world, pos, CollisionContext.empty()), BooleanOp.AND);
-            if (bl) {
-                BlockState blockState2 = world.getBlockState(blockPos.below());
-                return isLitCampfire(blockState2);
+            boolean flag = Shapes.joinIsNotEmpty(CampfireBlock.VIRTUAL_FENCE_POST, iblockdata.getCollisionShape(world, pos, CollisionContext.empty()), BooleanOp.AND);
+
+            if (flag) {
+                BlockState iblockdata1 = world.getBlockState(blockposition1.below());
+
+                return CampfireBlock.isLitCampfire(iblockdata1);
             }
         }
 
@@ -225,27 +250,27 @@
     }
 
     public static boolean isLitCampfire(BlockState state) {
-        return state.hasProperty(LIT) && state.is(BlockTags.CAMPFIRES) && state.getValue(LIT);
+        return state.hasProperty(CampfireBlock.LIT) && state.is(BlockTags.CAMPFIRES) && (Boolean) state.getValue(CampfireBlock.LIT);
     }
 
     @Override
     public FluidState getFluidState(BlockState state) {
-        return state.getValue(WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(state);
+        return (Boolean) state.getValue(CampfireBlock.WATERLOGGED) ? Fluids.WATER.getSource(false) : super.getFluidState(state);
     }
 
     @Override
     public BlockState rotate(BlockState state, Rotation rotation) {
-        return state.setValue(FACING, rotation.rotate(state.getValue(FACING)));
+        return (BlockState) state.setValue(CampfireBlock.FACING, rotation.rotate((Direction) state.getValue(CampfireBlock.FACING)));
     }
 
     @Override
     public BlockState mirror(BlockState state, Mirror mirror) {
-        return state.rotate(mirror.getRotation(state.getValue(FACING)));
+        return state.rotate(mirror.getRotation((Direction) state.getValue(CampfireBlock.FACING)));
     }
 
     @Override
     protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
-        builder.add(LIT, SIGNAL_FIRE, WATERLOGGED, FACING);
+        builder.add(CampfireBlock.LIT, CampfireBlock.SIGNAL_FIRE, CampfireBlock.WATERLOGGED, CampfireBlock.FACING);
     }
 
     @Override
@@ -256,11 +281,7 @@
     @Nullable
     @Override
     public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level world, BlockState state, BlockEntityType<T> type) {
-        if (world.isClientSide) {
-            return state.getValue(LIT) ? createTickerHelper(type, BlockEntityType.CAMPFIRE, CampfireBlockEntity::particleTick) : null;
-        } else {
-            return state.getValue(LIT) ? createTickerHelper(type, BlockEntityType.CAMPFIRE, CampfireBlockEntity::cookTick) : createTickerHelper(type, BlockEntityType.CAMPFIRE, CampfireBlockEntity::cooldownTick);
-        }
+        return world.isClientSide ? ((Boolean) state.getValue(CampfireBlock.LIT) ? createTickerHelper(type, BlockEntityType.CAMPFIRE, CampfireBlockEntity::particleTick) : null) : ((Boolean) state.getValue(CampfireBlock.LIT) ? createTickerHelper(type, BlockEntityType.CAMPFIRE, CampfireBlockEntity::cookTick) : createTickerHelper(type, BlockEntityType.CAMPFIRE, CampfireBlockEntity::cooldownTick));
     }
 
     @Override
@@ -269,8 +290,8 @@
     }
 
     public static boolean canLight(BlockState state) {
-        return state.is(BlockTags.CAMPFIRES, (statex) -> {
-            return statex.hasProperty(WATERLOGGED) && statex.hasProperty(LIT);
-        }) && !state.getValue(WATERLOGGED) && !state.getValue(LIT);
+        return state.is(BlockTags.CAMPFIRES, (blockbase_blockdata) -> {
+            return blockbase_blockdata.hasProperty(CampfireBlock.WATERLOGGED) && blockbase_blockdata.hasProperty(CampfireBlock.LIT);
+        }) && !(Boolean) state.getValue(CampfireBlock.WATERLOGGED) && !(Boolean) state.getValue(CampfireBlock.LIT);
     }
 }
