From 5c6b0dc6e41b0e416b2f90e51f220a1f956dbc5f Mon Sep 17 00:00:00 2001 From: md_5 Date: Tue, 21 Jan 2020 14:33:44 +1100 Subject: [PATCH] SPIGOT-5526: Call EntityChangeBlockEvent for bees triggering crop growth --- nms-patches/EntityBee.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nms-patches/EntityBee.patch b/nms-patches/EntityBee.patch index 0922534b18..bff0add189 100644 --- a/nms-patches/EntityBee.patch +++ b/nms-patches/EntityBee.patch @@ -46,6 +46,15 @@ } @Override +@@ -681,7 +685,7 @@ + } + } + +- if (flag) { ++ if (flag && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(EntityBee.this, blockposition, iblockdata.set(blockstateinteger, (Integer) iblockdata.get(blockstateinteger) + 1)).isCancelled()) { // Spigot + EntityBee.this.world.triggerEffect(2005, blockposition, 0); + EntityBee.this.world.setTypeUpdate(blockposition, (IBlockData) iblockdata.set(blockstateinteger, (Integer) iblockdata.get(blockstateinteger) + 1)); + EntityBee.this.eO(); @@ -696,7 +700,7 @@ class i extends EntityBee.a {