From dd8893a65c7976caea921fcf565c71d4a23aa2a2 Mon Sep 17 00:00:00 2001 From: LexManos Date: Thu, 20 Dec 2012 15:02:06 -0800 Subject: [PATCH] Fixed cpw's derp in the PlayerInteractEvent logic. --- .../net/minecraft/item/ItemInWorldManager.java.patch | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/patches/minecraft/net/minecraft/item/ItemInWorldManager.java.patch b/patches/minecraft/net/minecraft/item/ItemInWorldManager.java.patch index d0d119771..5911aa54c 100644 --- a/patches/minecraft/net/minecraft/item/ItemInWorldManager.java.patch +++ b/patches/minecraft/net/minecraft/item/ItemInWorldManager.java.patch @@ -180,9 +180,9 @@ + Block block = Block.blocksList[var11]; + boolean result = false; + -+ if (block != null) ++ if (block != null && (!par1EntityPlayer.isSneaking() || par1EntityPlayer.getHeldItem() == null)) + { -+ if ((!par1EntityPlayer.isSneaking() || par1EntityPlayer.getHeldItem() == null) && event.useBlock != Event.Result.DENY) ++ if (event.useBlock != Event.Result.DENY) + { + result = block.onBlockActivated(par2World, par4, par5, par6, par1EntityPlayer, par7, par8, par9, par10); + }