From e91fd75e19e7302acc17e8533c994f3973249548 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 28 Aug 2019 20:03:43 +1000 Subject: [PATCH] SPIGOT-5291: Missing event for ravagers trampling crops --- nms-patches/BlockCrops.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/nms-patches/BlockCrops.patch b/nms-patches/BlockCrops.patch index bca03cda73..0157257cd0 100644 --- a/nms-patches/BlockCrops.patch +++ b/nms-patches/BlockCrops.patch @@ -27,3 +27,12 @@ } protected int a(World world) { +@@ -125,7 +127,7 @@ + + @Override + public void a(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) { +- if (entity instanceof EntityRavager && world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)) { ++ if (entity instanceof EntityRavager && !CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.getBlockData(), !world.getGameRules().getBoolean(GameRules.MOB_GRIEFING)).isCancelled()) { // CraftBukkit + world.b(blockposition, true); + } +