From e79587649124b0c04257a7548cda6b194bb3cf7a Mon Sep 17 00:00:00 2001 From: Thinkofdeath Date: Fri, 28 Nov 2014 23:06:03 +0000 Subject: Fix interaction issues --- nms-patches/PlayerInteractManager.patch | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) (limited to 'nms-patches/PlayerInteractManager.patch') diff --git a/nms-patches/PlayerInteractManager.patch b/nms-patches/PlayerInteractManager.patch index 246be7a0..e1a0777f 100644 --- a/nms-patches/PlayerInteractManager.patch +++ b/nms-patches/PlayerInteractManager.patch @@ -1,5 +1,5 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/PlayerInteractManager.java 2014-11-28 17:43:43.329707430 +0000 -+++ src/main/java/net/minecraft/server/PlayerInteractManager.java 2014-11-28 17:38:18.000000000 +0000 +--- ../work/decompile-8eb82bde//net/minecraft/server/PlayerInteractManager.java 2014-11-28 23:05:41.725278672 +0000 ++++ src/main/java/net/minecraft/server/PlayerInteractManager.java 2014-11-28 22:57:12.389289000 +0000 @@ -1,5 +1,13 @@ package net.minecraft.server; @@ -43,7 +43,7 @@ if (this.isCreative()) { if (!this.world.douseFire((EntityHuman) null, blockposition, enumdirection)) { this.breakBlock(blockposition); -@@ -121,15 +142,49 @@ +@@ -121,14 +142,48 @@ } } @@ -85,16 +85,15 @@ + // Let the client know the block still exists + ((EntityPlayer) this.player).playerConnection.sendPacket(new PacketPlayOutBlockChange(this.world, blockposition)); + return; - } - ++ } ++ + if (blockEvent.getInstaBreak()) { + f = 2.0f; -+ } + } + // CraftBukkit end -+ + if (block.getMaterial() != Material.AIR && f >= 1.0F) { this.breakBlock(blockposition); - } else { @@ -146,6 +201,7 @@ public void a(BlockPosition blockposition) { @@ -211,7 +210,7 @@ if (this.gamemode == EnumGamemode.SPECTATOR) { TileEntity tileentity = world.getTileEntity(blockposition); -@@ -312,6 +439,75 @@ +@@ -312,6 +439,66 @@ return itemstack.placeItem(entityhuman, world, blockposition, enumdirection, f, f1, f2); } } @@ -272,15 +271,6 @@ + itemstack.count = k1; + } + } -+ -+ // If we have 'true' and no explicit deny *or* an explicit allow -- run the item part of the hook -+ if (itemstack != null && ((!result && event.useItemInHand() != Event.Result.DENY) || event.useItemInHand() == Event.Result.ALLOW)) { -+ if (itemstack.getItem() instanceof ItemBucket || itemstack.getItem() instanceof ItemFood) { -+ this.useItem(entityhuman, world, itemstack); -+ } else { -+ itemstack.placeItem(entityhuman, world, blockposition, enumdirection, f, f1, f2); -+ } -+ } + } + return result; + // CraftBukkit end -- cgit v1.2.3