From 2fe69605ec54d40a3d0dbf240af84ba15e555169 Mon Sep 17 00:00:00 2001 From: md_5 Date: Wed, 2 Mar 2016 17:07:08 +1100 Subject: [PATCH] SPIGOT-1605: Fix EntityChangeBlockEvent.setCancelled(Z)V --- nms-patches/EntityFallingBlock.patch | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nms-patches/EntityFallingBlock.patch b/nms-patches/EntityFallingBlock.patch index 43f43bb575..22aa5d3af6 100644 --- a/nms-patches/EntityFallingBlock.patch +++ b/nms-patches/EntityFallingBlock.patch @@ -18,11 +18,13 @@ this.world.setAir(blockposition); } else if (!this.world.isClientSide) { this.die(); -@@ -94,6 +96,12 @@ +@@ -93,7 +95,13 @@ + if (iblockdata.getBlock() != Blocks.PISTON_EXTENSION) { this.die(); if (!this.f) { - if (this.world.a(block, blockposition, true, EnumDirection.UP, (Entity) null, (ItemStack) null) && !BlockFalling.i(this.world.getType(blockposition.down())) && this.world.setTypeAndData(blockposition, this.block, 3)) { -+ // CraftBukkit start +- if (this.world.a(block, blockposition, true, EnumDirection.UP, (Entity) null, (ItemStack) null) && !BlockFalling.i(this.world.getType(blockposition.down())) && this.world.setTypeAndData(blockposition, this.block, 3)) { ++ // CraftBukkit start ++ if (this.world.a(block, blockposition, true, EnumDirection.UP, (Entity) null, (ItemStack) null) && !BlockFalling.i(this.world.getType(blockposition.down()))) { + if (CraftEventFactory.callEntityChangeBlockEvent(this, blockposition.getX(), blockposition.getY(), blockposition.getZ(), this.block.getBlock(), this.block.getBlock().toLegacyData(this.block)).isCancelled()) { + return; + }