--- a/net/minecraft/world/level/block/CampfireBlock.java
+++ b/net/minecraft/world/level/block/CampfireBlock.java
@@ -7,6 +7,7 @@
 import javax.annotation.Nullable;
 import net.minecraft.core.BlockPos;
 import net.minecraft.core.Direction;
+import net.minecraft.core.Holder;
 import net.minecraft.core.particles.ParticleTypes;
 import net.minecraft.core.particles.SimpleParticleType;
 import net.minecraft.sounds.SoundEvents;
@@ -40,6 +41,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;
@@ -50,55 +52,46 @@
 import net.minecraft.world.phys.shapes.VoxelShape;
 
 public class CampfireBlock extends BaseEntityBlock implements SimpleWaterloggedBlock {
-    public static final MapCodec<CampfireBlock> CODEC = RecordCodecBuilder.mapCodec(
-        instance -> instance.group(
-                    Codec.BOOL.fieldOf("spawn_particles").forGetter(block -> block.spawnParticles),
-                    Codec.intRange(0, 1000).fieldOf("fire_damage").forGetter(block -> block.fireDamage),
-                    propertiesCodec()
-                )
-                .apply(instance, CampfireBlock::new)
-    );
-    protected static final VoxelShape SHAPE = Block.box(0.0, 0.0, 0.0, 16.0, 7.0, 16.0);
+
+    public static final MapCodec<CampfireBlock> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
+        return instance.group(Codec.BOOL.fieldOf("spawn_particles").forGetter((blockcampfire) -> {
+            return blockcampfire.spawnParticles;
+        }), Codec.intRange(0, 1000).fieldOf("fire_damage").forGetter((blockcampfire) -> {
+            return blockcampfire.fireDamage;
+        }), propertiesCodec()).apply(instance, CampfireBlock::new);
+    });
+    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;
     public static final BooleanProperty WATERLOGGED = BlockStateProperties.WATERLOGGED;
     public static final DirectionProperty FACING = BlockStateProperties.HORIZONTAL_FACING;
-    private static final VoxelShape VIRTUAL_FENCE_POST = Block.box(6.0, 0.0, 6.0, 10.0, 16.0, 10.0);
+    private static final VoxelShape VIRTUAL_FENCE_POST = Block.box(6.0D, 0.0D, 6.0D, 10.0D, 16.0D, 10.0D);
     private static final int SMOKE_DISTANCE = 5;
     private final boolean spawnParticles;
     private final int fireDamage;
 
     @Override
     public MapCodec<CampfireBlock> codec() {
-        return CODEC;
+        return CampfireBlock.CODEC;
     }
 
     public CampfireBlock(boolean emitsParticles, int fireDamage, BlockBehaviour.Properties settings) {
         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
-    protected ItemInteractionResult useItemOn(
-        ItemStack stack, BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit
-    ) {
-        if (world.getBlockEntity(pos) instanceof CampfireBlockEntity campfireBlockEntity) {
-            ItemStack itemStack = player.getItemInHand(hand);
-            Optional<RecipeHolder<CampfireCookingRecipe>> optional = campfireBlockEntity.getCookableRecipe(itemStack);
+    protected ItemInteractionResult useItemOn(ItemStack stack, BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
+        BlockEntity tileentity = world.getBlockEntity(pos);
+
+        if (tileentity instanceof CampfireBlockEntity tileentitycampfire) {
+            ItemStack itemstack1 = player.getItemInHand(hand);
+            Optional<RecipeHolder<CampfireCookingRecipe>> optional = tileentitycampfire.getCookableRecipe(itemstack1);
+
             if (optional.isPresent()) {
-                if (!world.isClientSide
-                    && campfireBlockEntity.placeFood(
-                        player, player.hasInfiniteMaterials() ? itemStack.copy() : itemStack, optional.get().value().getCookingTime()
-                    )) {
+                if (!world.isClientSide && tileentitycampfire.placeFood(player, player.hasInfiniteMaterials() ? itemstack1.copy() : itemstack1, ((CampfireCookingRecipe) ((RecipeHolder) optional.get()).value()).getCookingTime())) {
                     player.awardStat(Stats.INTERACT_WITH_CAMPFIRE);
                     return ItemInteractionResult.SUCCESS;
                 }
@@ -112,8 +105,9 @@
 
     @Override
     protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
-        if (state.getValue(LIT) && entity instanceof LivingEntity && !EnchantmentHelper.hasFrostWalker((LivingEntity)entity)) {
-            entity.hurt(world.damageSources().inFire(), (float)this.fireDamage);
+        if (!new io.papermc.paper.event.entity.EntityInsideBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(world, pos)).callEvent()) { return; } // Paper - Add EntityInsideBlockEvent
+        if ((Boolean) state.getValue(CampfireBlock.LIT) && entity instanceof LivingEntity && !EnchantmentHelper.hasFrostWalker((LivingEntity) entity)) {
+            entity.hurt(world.damageSources().inFire().directBlock(world, pos), (float) this.fireDamage); // CraftBukkit
         }
 
         super.entityInside(state, world, pos, entity);
@@ -122,9 +116,10 @@
     @Override
     protected 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);
@@ -134,25 +129,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
     protected 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) {
@@ -161,7 +151,7 @@
 
     @Override
     protected VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
-        return SHAPE;
+        return CampfireBlock.SHAPE;
     }
 
     @Override
@@ -171,64 +161,50 @@
 
     @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.5,
-                    (double)pos.getY() + 0.5,
-                    (double)pos.getZ() + 0.5,
-                    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.5,
-                        (double)pos.getY() + 0.5,
-                        (double)pos.getZ() + 0.5,
-                        (double)(random.nextFloat() / 2.0F),
-                        5.0E-5,
-                        (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));
                 }
             }
+
         }
     }
 
     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);
+        world.gameEvent(entity, (Holder) GameEvent.BLOCK_CHANGE, pos);
     }
 
     @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(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(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 {
@@ -238,50 +214,45 @@
 
     @Override
     protected 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.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.5 + randomSource.nextDouble() / 3.0 * (double)(randomSource.nextBoolean() ? 1 : -1),
-            (double)pos.getY() + randomSource.nextDouble() + randomSource.nextDouble(),
-            (double)pos.getZ() + 0.5 + randomSource.nextDouble() / 3.0 * (double)(randomSource.nextBoolean() ? 1 : -1),
-            0.0,
-            0.07,
-            0.0
-        );
+        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.5 + randomSource.nextDouble() / 4.0 * (double)(randomSource.nextBoolean() ? 1 : -1),
-                (double)pos.getY() + 0.4,
-                (double)pos.getZ() + 0.5 + randomSource.nextDouble() / 4.0 * (double)(randomSource.nextBoolean() ? 1 : -1),
-                0.0,
-                0.005,
-                0.0
-            );
+            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);
             }
         }
 
@@ -289,27 +260,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
     protected 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
     protected 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
     protected 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
@@ -320,13 +291,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
@@ -335,8 +300,8 @@
     }
 
     public static boolean canLight(BlockState state) {
-        return state.is(BlockTags.CAMPFIRES, statex -> 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);
     }
 }
