mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-10 03:52:45 +01:00
9ee989ea81
By: md_5 <git@md-5.net>
30 lines
1.4 KiB
Diff
30 lines
1.4 KiB
Diff
--- 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;
|
|
|
|
+// CraftBukkit start
|
|
+import org.bukkit.TreeType;
|
|
+// CraftBukkit end
|
|
+
|
|
public class BlockMushroom extends BlockPlant implements IBlockFragilePlantElement {
|
|
|
|
protected static final float AABB_OFFSET = 3.0F;
|
|
@@ -61,7 +65,7 @@
|
|
}
|
|
|
|
if (worldserver.isEmptyBlock(blockposition2) && iblockdata.canSurvive(worldserver, blockposition2)) {
|
|
- worldserver.setBlock(blockposition2, iblockdata, 2);
|
|
+ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition2, iblockdata, 2); // CraftBukkit
|
|
}
|
|
}
|
|
|
|
@@ -82,6 +86,7 @@
|
|
|
|
public boolean growMushroom(WorldServer worldserver, BlockPosition blockposition, IBlockData iblockdata, Random random) {
|
|
worldserver.removeBlock(blockposition, false);
|
|
+ BlockSapling.treeType = (this == Blocks.BROWN_MUSHROOM) ? TreeType.BROWN_MUSHROOM : TreeType.BROWN_MUSHROOM; // CraftBukkit
|
|
if (((WorldGenFeatureConfigured) ((Holder) this.featureSupplier.get()).value()).place(worldserver, worldserver.getChunkSource().getGenerator(), random, blockposition)) {
|
|
return true;
|
|
} else {
|