--- a/net/minecraft/world/level/block/FungusBlock.java
+++ b/net/minecraft/world/level/block/FungusBlock.java
@@ -18,6 +18,7 @@
 import net.minecraft.world.phys.shapes.VoxelShape;
 
 public class FungusBlock extends BushBlock implements BonemealableBlock {
+
     protected static final VoxelShape SHAPE = Block.box(4.0D, 0.0D, 4.0D, 12.0D, 9.0D, 12.0D);
     private static final double BONEMEAL_SUCCESS_PROBABILITY = 0.4D;
     private final Block requiredBlock;
@@ -31,7 +32,7 @@
 
     @Override
     public VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
-        return SHAPE;
+        return FungusBlock.SHAPE;
     }
 
     @Override
@@ -45,19 +46,27 @@
 
     @Override
     public boolean isValidBonemealTarget(LevelReader world, BlockPos pos, BlockState state) {
-        BlockState blockState = world.getBlockState(pos.below());
-        return blockState.is(this.requiredBlock);
+        BlockState iblockdata1 = world.getBlockState(pos.below());
+
+        return iblockdata1.is(this.requiredBlock);
     }
 
     @Override
     public boolean isBonemealSuccess(Level world, RandomSource random, BlockPos pos, BlockState state) {
-        return (double)random.nextFloat() < 0.4D;
+        return (double) random.nextFloat() < 0.4D;
     }
 
     @Override
     public void performBonemeal(ServerLevel world, RandomSource random, BlockPos pos, BlockState state) {
-        this.getFeature(world).ifPresent((featureEntry) -> {
-            featureEntry.value().place(world, world.getChunkSource().getGenerator(), random, pos);
+        this.getFeature(world).ifPresent((holder) -> {
+            // CraftBukkit start
+            if (this == Blocks.WARPED_FUNGUS) {
+                SaplingBlock.treeType = org.bukkit.TreeType.WARPED_FUNGUS;
+            } else if (this == Blocks.CRIMSON_FUNGUS) {
+                SaplingBlock.treeType = org.bukkit.TreeType.CRIMSON_FUNGUS;
+            }
+            // CraftBukkit end
+            ((ConfiguredFeature) holder.value()).place(world, world.getChunkSource().getGenerator(), random, pos);
         });
     }
 }
