summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockTallPlant.patch
blob: a1127a3aed43ed98bb144b1de191e24b5c14f03c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- a/net/minecraft/server/BlockTallPlant.java
+++ b/net/minecraft/server/BlockTallPlant.java
@@ -48,6 +48,11 @@
 
     protected void e(World world, BlockPosition blockposition, IBlockData iblockdata) {
         if (!this.f(world, blockposition, iblockdata)) {
+            // CraftBukkit start
+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, blockposition).isCancelled()) {
+                return;
+            }
+            // CraftBukkit end
             boolean flag = iblockdata.get(BlockTallPlant.HALF) == BlockTallPlant.EnumTallPlantHalf.UPPER;
             BlockPosition blockposition1 = flag ? blockposition : blockposition.up();
             BlockPosition blockposition2 = flag ? blockposition.down() : blockposition;