--- a/net/minecraft/world/level/block/NyliumBlock.java
+++ b/net/minecraft/world/level/block/NyliumBlock.java
@@ -18,11 +18,12 @@
 import net.minecraft.world.level.lighting.LightEngine;
 
 public class NyliumBlock extends Block implements BonemealableBlock {
+
     public static final MapCodec<NyliumBlock> CODEC = simpleCodec(NyliumBlock::new);
 
     @Override
     public MapCodec<NyliumBlock> codec() {
-        return CODEC;
+        return NyliumBlock.CODEC;
     }
 
     protected NyliumBlock(BlockBehaviour.Properties settings) {
@@ -30,17 +31,24 @@
     }
 
     private static boolean canBeNylium(BlockState state, LevelReader world, BlockPos pos) {
-        BlockPos blockPos = pos.above();
-        BlockState blockState = world.getBlockState(blockPos);
-        int i = LightEngine.getLightBlockInto(world, state, pos, blockState, blockPos, Direction.UP, blockState.getLightBlock(world, blockPos));
+        BlockPos blockposition1 = pos.above();
+        BlockState iblockdata1 = world.getBlockState(blockposition1);
+        int i = LightEngine.getLightBlockInto(world, state, pos, iblockdata1, blockposition1, Direction.UP, iblockdata1.getLightBlock(world, blockposition1));
+
         return i < world.getMaxLightLevel();
     }
 
     @Override
     protected void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
-        if (!canBeNylium(state, world, pos)) {
+        if (!NyliumBlock.canBeNylium(state, world, pos)) {
+            // CraftBukkit start
+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, Blocks.NETHERRACK.defaultBlockState()).isCancelled()) {
+                return;
+            }
+            // CraftBukkit end
             world.setBlockAndUpdate(pos, Blocks.NETHERRACK.defaultBlockState());
         }
+
     }
 
     @Override
@@ -55,30 +63,27 @@
 
     @Override
     public void performBonemeal(ServerLevel world, RandomSource random, BlockPos pos, BlockState state) {
-        BlockState blockState = world.getBlockState(pos);
-        BlockPos blockPos = pos.above();
-        ChunkGenerator chunkGenerator = world.getChunkSource().getGenerator();
-        Registry<ConfiguredFeature<?, ?>> registry = world.registryAccess().registryOrThrow(Registries.CONFIGURED_FEATURE);
-        if (blockState.is(Blocks.CRIMSON_NYLIUM)) {
-            this.place(registry, NetherFeatures.CRIMSON_FOREST_VEGETATION_BONEMEAL, world, chunkGenerator, random, blockPos);
-        } else if (blockState.is(Blocks.WARPED_NYLIUM)) {
-            this.place(registry, NetherFeatures.WARPED_FOREST_VEGETATION_BONEMEAL, world, chunkGenerator, random, blockPos);
-            this.place(registry, NetherFeatures.NETHER_SPROUTS_BONEMEAL, world, chunkGenerator, random, blockPos);
+        BlockState iblockdata1 = world.getBlockState(pos);
+        BlockPos blockposition1 = pos.above();
+        ChunkGenerator chunkgenerator = world.getChunkSource().getGenerator();
+        Registry<ConfiguredFeature<?, ?>> iregistry = world.registryAccess().registryOrThrow(Registries.CONFIGURED_FEATURE);
+
+        if (iblockdata1.is(Blocks.CRIMSON_NYLIUM)) {
+            this.place(iregistry, NetherFeatures.CRIMSON_FOREST_VEGETATION_BONEMEAL, world, chunkgenerator, random, blockposition1);
+        } else if (iblockdata1.is(Blocks.WARPED_NYLIUM)) {
+            this.place(iregistry, NetherFeatures.WARPED_FOREST_VEGETATION_BONEMEAL, world, chunkgenerator, random, blockposition1);
+            this.place(iregistry, NetherFeatures.NETHER_SPROUTS_BONEMEAL, world, chunkgenerator, random, blockposition1);
             if (random.nextInt(8) == 0) {
-                this.place(registry, NetherFeatures.TWISTING_VINES_BONEMEAL, world, chunkGenerator, random, blockPos);
+                this.place(iregistry, NetherFeatures.TWISTING_VINES_BONEMEAL, world, chunkgenerator, random, blockposition1);
             }
         }
+
     }
 
-    private void place(
-        Registry<ConfiguredFeature<?, ?>> registry,
-        ResourceKey<ConfiguredFeature<?, ?>> key,
-        ServerLevel world,
-        ChunkGenerator chunkGenerator,
-        RandomSource random,
-        BlockPos pos
-    ) {
-        registry.getHolder(key).ifPresent(entry -> entry.value().place(world, chunkGenerator, random, pos));
+    private void place(Registry<ConfiguredFeature<?, ?>> registry, ResourceKey<ConfiguredFeature<?, ?>> key, ServerLevel world, ChunkGenerator chunkGenerator, RandomSource random, BlockPos pos) {
+        registry.getHolder(key).ifPresent((holder_c) -> {
+            ((ConfiguredFeature) holder_c.value()).place(world, chunkGenerator, random, pos);
+        });
     }
 
     @Override
