--- a/net/minecraft/world/level/block/FungusBlock.java
+++ b/net/minecraft/world/level/block/FungusBlock.java
@@ -72,6 +_,17 @@
 
     @Override
     public void performBonemeal(ServerLevel level, RandomSource random, BlockPos pos, BlockState state) {
-        this.getFeature(level).ifPresent(holder -> holder.value().place(level, level.getChunkSource().getGenerator(), random, pos));
+        this.getFeature(level)
+            // CraftBukkit start
+            .map((value) -> {
+                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;
+                }
+                return value;
+            })
+            .ifPresent(holder -> holder.value().place(level, level.getChunkSource().getGenerator(), random, pos));
+        // CraftBukkit end
     }
 }
