From 1cbed230d642e439f844408fb826c538534ef895 Mon Sep 17 00:00:00 2001 From: Erik Broes Date: Sat, 26 Mar 2011 09:56:16 +0100 Subject: [PATCH] Add LEFT_CLICK_BLOCK's face --- src/main/java/net/minecraft/server/ItemInWorldManager.java | 5 +++-- src/main/java/net/minecraft/server/NetServerHandler.java | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/minecraft/server/ItemInWorldManager.java b/src/main/java/net/minecraft/server/ItemInWorldManager.java index 14c0b37967..23a926f1cc 100644 --- a/src/main/java/net/minecraft/server/ItemInWorldManager.java +++ b/src/main/java/net/minecraft/server/ItemInWorldManager.java @@ -52,7 +52,8 @@ public class ItemInWorldManager { } } - public void a(int i, int j, int k) { + // CraftBukkit added face + public void a(int i, int j, int k, int face) { this.d = this.j; int l = this.b.getTypeId(i, j, k); @@ -62,7 +63,7 @@ public class ItemInWorldManager { return; } - PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.a, Action.LEFT_CLICK_BLOCK , i, j, k, -1, this.a.inventory.b()); + PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.a, Action.LEFT_CLICK_BLOCK , i, j, k, face, this.a.inventory.b()); if (event.useInteractedBlock() == Event.Result.DENY) { // If we denied a door from opening, we need to send a correcting update to the client, as it already opened the door. diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index fd17fd3071..1ea515cca0 100644 --- a/src/main/java/net/minecraft/server/NetServerHandler.java +++ b/src/main/java/net/minecraft/server/NetServerHandler.java @@ -351,7 +351,8 @@ public class NetServerHandler extends NetHandler implements ICommandListener { if (packet14blockdig.e == 0) { // CraftBukkit if (i1 > this.d.spawnProtection || flag) { - this.e.c.a(i, j, k); + // CraftBukkit add face argument + this.e.c.a(i, j, k, packet14blockdig.d); } } else if (packet14blockdig.e == 2) { this.e.c.b(i, j, k);