From be0bbbabef31c05faf6aa1b2c982288e4fbd5126 Mon Sep 17 00:00:00 2001 From: BlackHole Date: Sun, 6 Mar 2016 03:05:59 +0100 Subject: [PATCH] SPIGOT-1762: Call EntityChangeBlockEvent for boats destroying lily pads --- nms-patches/BlockWaterLily.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 nms-patches/BlockWaterLily.patch diff --git a/nms-patches/BlockWaterLily.patch b/nms-patches/BlockWaterLily.patch new file mode 100644 index 0000000000..30f32ef91f --- /dev/null +++ b/nms-patches/BlockWaterLily.patch @@ -0,0 +1,11 @@ +--- a/net/minecraft/server/BlockWaterLily.java ++++ b/net/minecraft/server/BlockWaterLily.java +@@ -19,7 +19,7 @@ + + public void a(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) { + super.a(world, blockposition, iblockdata, entity); +- if (entity instanceof EntityBoat) { ++ if (entity instanceof EntityBoat && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition.getX(), blockposition.getY(), blockposition.getZ(), Blocks.AIR, 0).isCancelled()) { // CraftBukkit + world.setAir(new BlockPosition(blockposition), true); + } +