diff options
author | EvilSeph <evilseph@gmail.com> | 2012-01-10 01:08:49 -0500 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2012-01-10 01:17:19 -0500 |
commit | bff4d0f696a44f345b0d898906309c17641e7161 (patch) | |
tree | 34b7424b48b4da556d335abb493b10a9f368f0f3 | |
parent | 67dbe71bd92bce7014c271e711bac4ae6002de3f (diff) | |
download | craftbukkit-bff4d0f696a44f345b0d898906309c17641e7161.tar craftbukkit-bff4d0f696a44f345b0d898906309c17641e7161.tar.gz craftbukkit-bff4d0f696a44f345b0d898906309c17641e7161.tar.lz craftbukkit-bff4d0f696a44f345b0d898906309c17641e7161.tar.xz craftbukkit-bff4d0f696a44f345b0d898906309c17641e7161.zip |
Improved our handling of player interactions.
-rw-r--r-- | src/main/java/net/minecraft/server/NetServerHandler.java | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/main/java/net/minecraft/server/NetServerHandler.java b/src/main/java/net/minecraft/server/NetServerHandler.java index 16ec9ee6..70f662ff 100644 --- a/src/main/java/net/minecraft/server/NetServerHandler.java +++ b/src/main/java/net/minecraft/server/NetServerHandler.java @@ -495,7 +495,11 @@ public class NetServerHandler extends NetHandler implements ICommandListener { if (i1 < this.server.getSpawnRadius() && !flag) { this.player.netServerHandler.sendPacket(new Packet53BlockChange(i, j, k, worldserver)); } else { - this.player.itemInWorldManager.dig(i, j, k, packet14blockdig.face); + // CraftBukkit start + if (this.getPlayer().getTargetBlock(null, 6).getLocation().equals(new Location(worldserver.getWorld(), i, j, k))) { + this.player.itemInWorldManager.dig(i, j, k, packet14blockdig.face); + } + // CraftBukkit end } } else if (packet14blockdig.e == 2) { this.player.itemInWorldManager.a(i, j, k); @@ -587,11 +591,11 @@ public class NetServerHandler extends NetHandler implements ICommandListener { return; } flag = true; // spawn protection moved to ItemBlock!!! - // CraftBukkit end - if (j1 > 16 || flag) { + if (j1 > 16 || flag && this.getPlayer().getTargetBlock(null, 6).getLocation().equals(new Location(worldserver.getWorld(), i, j, k))) { this.player.itemInWorldManager.interact(this.player, worldserver, itemstack, i, j, k, l); } + // CraftBukkit end this.player.netServerHandler.sendPacket(new Packet53BlockChange(i, j, k, worldserver)); if (l == 0) { |