diff options
Diffstat (limited to 'patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/DoublePlantBlock.java.patch')
-rw-r--r-- | patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/DoublePlantBlock.java.patch | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/DoublePlantBlock.java.patch b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/DoublePlantBlock.java.patch new file mode 100644 index 0000000000..1f0897e3b3 --- /dev/null +++ b/patch-remap/mache-spigotflower-stripped/net/minecraft/world/level/block/DoublePlantBlock.java.patch @@ -0,0 +1,18 @@ +--- a/net/minecraft/world/level/block/DoublePlantBlock.java ++++ b/net/minecraft/world/level/block/DoublePlantBlock.java +@@ -107,8 +100,13 @@ + super.playerDestroy(level, player, blockpos, Blocks.AIR.defaultBlockState(), blockentity, itemstack); + } + +- protected static void preventDropFromBottomPart(Level level, BlockPos blockpos, BlockState blockstate, Player player) { +- DoubleBlockHalf doubleblockhalf = (DoubleBlockHalf) blockstate.getValue(DoublePlantBlock.HALF); ++ protected static void preventDropFromBottomPart(Level world, BlockPos blockposition, IBlockData iblockdata, Player entityhuman) { ++ // CraftBukkit start ++ if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, blockposition).isCancelled()) { ++ return; ++ } ++ // CraftBukkit end ++ BlockPropertyDoubleBlockHalf blockpropertydoubleblockhalf = (BlockPropertyDoubleBlockHalf) iblockdata.getValue(DoublePlantBlock.HALF); + + if (doubleblockhalf == DoubleBlockHalf.UPPER) { + BlockPos blockpos1 = blockpos.below(); |