summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockWaterLily.patch
diff options
context:
space:
mode:
authorBlackHole <black-hole@live.com>2016-03-06 03:05:59 +0100
committermd_5 <git@md-5.net>2016-03-06 21:36:11 +1100
commitbe0bbbabef31c05faf6aa1b2c982288e4fbd5126 (patch)
tree1cb76f89bf52f50fe64cea70b670b3bd9e338806 /nms-patches/BlockWaterLily.patch
parent55b0def5d9bd491382877a7e680da6f6e5061ce0 (diff)
downloadcraftbukkit-be0bbbabef31c05faf6aa1b2c982288e4fbd5126.tar
craftbukkit-be0bbbabef31c05faf6aa1b2c982288e4fbd5126.tar.gz
craftbukkit-be0bbbabef31c05faf6aa1b2c982288e4fbd5126.tar.lz
craftbukkit-be0bbbabef31c05faf6aa1b2c982288e4fbd5126.tar.xz
craftbukkit-be0bbbabef31c05faf6aa1b2c982288e4fbd5126.zip
SPIGOT-1762: Call EntityChangeBlockEvent for boats destroying lily pads
Diffstat (limited to 'nms-patches/BlockWaterLily.patch')
-rw-r--r--nms-patches/BlockWaterLily.patch11
1 files changed, 11 insertions, 0 deletions
diff --git a/nms-patches/BlockWaterLily.patch b/nms-patches/BlockWaterLily.patch
new file mode 100644
index 00000000..30f32ef9
--- /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);
+ }
+