aboutsummaryrefslogtreecommitdiffhomepage
path: root/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/MushroomBlock.java.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/MushroomBlock.java.patch')
-rw-r--r--patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/MushroomBlock.java.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/MushroomBlock.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/MushroomBlock.java.patch
new file mode 100644
index 0000000000..1898945308
--- /dev/null
+++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/MushroomBlock.java.patch
@@ -0,0 +1,35 @@
+--- a/net/minecraft/world/level/block/MushroomBlock.java
++++ b/net/minecraft/world/level/block/MushroomBlock.java
+@@ -19,6 +19,9 @@
+ import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++// CraftBukkit start
++import org.bukkit.TreeType;
++// CraftBukkit end
+
+ public class MushroomBlock extends BushBlock implements BonemealableBlock {
+
+@@ -77,8 +77,8 @@
+ blockpos2 = blockpos.offset(randomsource.nextInt(3) - 1, randomsource.nextInt(2) - randomsource.nextInt(2), randomsource.nextInt(3) - 1);
+ }
+
+- if (serverlevel.isEmptyBlock(blockpos2) && blockstate.canSurvive(serverlevel, blockpos2)) {
+- serverlevel.setBlock(blockpos2, blockstate, 2);
++ if (level.isEmptyBlock(blockposition2) && state.canSurvive(level, blockposition2)) {
++ org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(level, pos, blockposition2, state, 2); // CraftBukkit
+ }
+ }
+
+@@ -105,8 +103,9 @@
+ if (optional.isEmpty()) {
+ return false;
+ } else {
+- serverlevel.removeBlock(blockpos, false);
+- if (((ConfiguredFeature) ((Holder) optional.get()).value()).place(serverlevel, serverlevel.getChunkSource().getGenerator(), randomsource, blockpos)) {
++ level.removeBlock(pos, false);
++ SaplingBlock.treeType = (this == Blocks.BROWN_MUSHROOM) ? TreeType.BROWN_MUSHROOM : TreeType.BROWN_MUSHROOM; // CraftBukkit
++ if (((ConfiguredFeature) ((Holder) optional.get()).value()).place(level, level.getChunkSource().getGenerator(), random, pos)) {
+ return true;
+ } else {
+ serverlevel.setBlock(blockpos, blockstate, 3);