--- a/net/minecraft/world/level/block/CoralPlantBlock.java
+++ b/net/minecraft/world/level/block/CoralPlantBlock.java
@@ -11,21 +11,25 @@
 import net.minecraft.world.level.LevelAccessor;
 import net.minecraft.world.level.block.state.BlockBehaviour;
 import net.minecraft.world.level.block.state.BlockState;
+import net.minecraft.world.level.material.Fluid;
 import net.minecraft.world.level.material.Fluids;
 import net.minecraft.world.phys.shapes.CollisionContext;
 import net.minecraft.world.phys.shapes.VoxelShape;
 
 public class CoralPlantBlock extends BaseCoralPlantTypeBlock {
-    public static final MapCodec<CoralPlantBlock> CODEC = RecordCodecBuilder.mapCodec(
-        instance -> instance.group(CoralBlock.DEAD_CORAL_FIELD.forGetter(block -> block.deadBlock), propertiesCodec()).apply(instance, CoralPlantBlock::new)
-    );
+
+    public static final MapCodec<CoralPlantBlock> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
+        return instance.group(CoralBlock.DEAD_CORAL_FIELD.forGetter((blockcoralplant) -> {
+            return blockcoralplant.deadBlock;
+        }), propertiesCodec()).apply(instance, CoralPlantBlock::new);
+    });
     private final Block deadBlock;
     protected static final float AABB_OFFSET = 6.0F;
-    protected static final VoxelShape SHAPE = Block.box(2.0, 0.0, 2.0, 14.0, 15.0, 14.0);
+    protected static final VoxelShape SHAPE = Block.box(2.0D, 0.0D, 2.0D, 14.0D, 15.0D, 14.0D);
 
     @Override
     public MapCodec<CoralPlantBlock> codec() {
-        return CODEC;
+        return CoralPlantBlock.CODEC;
     }
 
     protected CoralPlantBlock(Block deadCoralBlock, BlockBehaviour.Properties settings) {
@@ -41,8 +45,14 @@
     @Override
     protected void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
         if (!scanForWater(state, world, pos)) {
-            world.setBlock(pos, this.deadBlock.defaultBlockState().setValue(WATERLOGGED, Boolean.valueOf(false)), 2);
+            // CraftBukkit start
+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, this.deadBlock.defaultBlockState().setValue(CoralPlantBlock.WATERLOGGED, false)).isCancelled()) {
+                return;
+            }
+            // CraftBukkit end
+            world.setBlock(pos, (BlockState) this.deadBlock.defaultBlockState().setValue(CoralPlantBlock.WATERLOGGED, false), 2);
         }
+
     }
 
     @Override
@@ -51,8 +61,8 @@
             return Blocks.AIR.defaultBlockState();
         } else {
             this.tryScheduleDieTick(state, world, pos);
-            if (state.getValue(WATERLOGGED)) {
-                world.scheduleTick(pos, Fluids.WATER, Fluids.WATER.getTickDelay(world));
+            if ((Boolean) state.getValue(CoralPlantBlock.WATERLOGGED)) {
+                world.scheduleTick(pos, (Fluid) Fluids.WATER, Fluids.WATER.getTickDelay(world));
             }
 
             return super.updateShape(state, direction, neighborState, world, pos, neighborPos);
@@ -61,6 +71,6 @@
 
     @Override
     protected VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
-        return SHAPE;
+        return CoralPlantBlock.SHAPE;
     }
 }
