2021-03-15 23:00:00 +01:00
|
|
|
--- a/net/minecraft/world/level/block/BlockMushroom.java
|
|
|
|
+++ b/net/minecraft/world/level/block/BlockMushroom.java
|
|
|
|
@@ -16,6 +16,10 @@
|
|
|
|
import net.minecraft.world.phys.shapes.VoxelShape;
|
|
|
|
import net.minecraft.world.phys.shapes.VoxelShapeCollision;
|
2014-11-25 22:32:16 +01:00
|
|
|
|
|
|
|
+// CraftBukkit start
|
|
|
|
+import org.bukkit.TreeType;
|
|
|
|
+// CraftBukkit end
|
|
|
|
+
|
|
|
|
public class BlockMushroom extends BlockPlant implements IBlockFragilePlantElement {
|
|
|
|
|
2021-06-11 07:00:00 +02:00
|
|
|
protected static final float AABB_OFFSET = 3.0F;
|
|
|
|
@@ -61,7 +65,7 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|
|
|
|
|
2021-11-21 23:00:00 +01:00
|
|
|
if (worldserver.isEmptyBlock(blockposition2) && iblockdata.canSurvive(worldserver, blockposition2)) {
|
|
|
|
- worldserver.setBlock(blockposition2, iblockdata, 2);
|
2019-12-10 23:00:00 +01:00
|
|
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition2, iblockdata, 2); // CraftBukkit
|
2014-11-25 22:32:16 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-15 23:00:00 +01:00
|
|
|
@@ -82,6 +86,7 @@
|
2014-11-25 22:32:16 +01:00
|
|
|
|
2022-06-07 18:00:00 +02:00
|
|
|
public boolean growMushroom(WorldServer worldserver, BlockPosition blockposition, IBlockData iblockdata, RandomSource randomsource) {
|
2021-11-21 23:00:00 +01:00
|
|
|
worldserver.removeBlock(blockposition, false);
|
2021-06-11 07:00:00 +02:00
|
|
|
+ BlockSapling.treeType = (this == Blocks.BROWN_MUSHROOM) ? TreeType.BROWN_MUSHROOM : TreeType.BROWN_MUSHROOM; // CraftBukkit
|
2022-06-07 18:00:00 +02:00
|
|
|
if (((WorldGenFeatureConfigured) ((Holder) this.featureSupplier.get()).value()).place(worldserver, worldserver.getChunkSource().getGenerator(), randomsource, blockposition)) {
|
2021-06-11 07:00:00 +02:00
|
|
|
return true;
|
2019-12-10 23:00:00 +01:00
|
|
|
} else {
|