PaperMC/nms-patches/BlockTallPlant.patch

14 lines
776 B
Diff

--- 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;