summaryrefslogtreecommitdiffstats
path: root/nms-patches/ContainerWorkbench.patch
diff options
context:
space:
mode:
authorFearThe1337 <admin@fearthe1337.com>2014-12-09 20:44:59 +0100
committermd_5 <git@md-5.net>2014-12-12 11:03:52 +1100
commit45cd36e553dc7bfa501ec2efca1c9e2f36c370a2 (patch)
tree31a3a29ab2dbd9ddc842dd10728c0486fe80525c /nms-patches/ContainerWorkbench.patch
parentc13e6e69a23279e424a37576d84ff98f3eb67455 (diff)
downloadcraftbukkit-45cd36e553dc7bfa501ec2efca1c9e2f36c370a2.tar
craftbukkit-45cd36e553dc7bfa501ec2efca1c9e2f36c370a2.tar.gz
craftbukkit-45cd36e553dc7bfa501ec2efca1c9e2f36c370a2.tar.lz
craftbukkit-45cd36e553dc7bfa501ec2efca1c9e2f36c370a2.tar.xz
craftbukkit-45cd36e553dc7bfa501ec2efca1c9e2f36c370a2.zip
Fix a client crash issue involving maps.
Diffstat (limited to 'nms-patches/ContainerWorkbench.patch')
-rw-r--r--nms-patches/ContainerWorkbench.patch14
1 files changed, 8 insertions, 6 deletions
diff --git a/nms-patches/ContainerWorkbench.patch b/nms-patches/ContainerWorkbench.patch
index ca034b03..512ff3fc 100644
--- a/nms-patches/ContainerWorkbench.patch
+++ b/nms-patches/ContainerWorkbench.patch
@@ -1,5 +1,5 @@
---- ../work/decompile-8eb82bde//net/minecraft/server/ContainerWorkbench.java 2014-11-28 17:43:43.021707437 +0000
-+++ src/main/java/net/minecraft/server/ContainerWorkbench.java 2014-11-28 17:38:17.000000000 +0000
+--- ../work/decompile-8eb82bde//net/minecraft/server/ContainerWorkbench.java 2014-12-09 20:39:54.821706281 +0100
++++ src/main/java/net/minecraft/server/ContainerWorkbench.java 2014-12-09 20:39:42.000000000 +0100
@@ -1,13 +1,28 @@
package net.minecraft.server;
@@ -31,7 +31,7 @@
this.g = world;
this.h = blockposition;
this.a((Slot) (new SlotResult(playerinventory.player, this.craftInventory, this.resultInventory, 0, 124, 35)));
-@@ -35,7 +50,18 @@
+@@ -35,7 +50,20 @@
}
public void a(IInventory iinventory) {
@@ -44,14 +44,16 @@
+ if (super.listeners.size() < 1) {
+ return;
+ }
-+
++ if (craftResult != null && craftResult.getItem() == Items.FILLED_MAP) {
++ return;
++ }
+ EntityPlayer player = (EntityPlayer) super.listeners.get(0); // TODO: Is this _always_ correct? Seems like it.
+ player.playerConnection.sendPacket(new PacketPlayOutSetSlot(player.activeContainer.windowId, 0, craftResult));
+ // CraftBukkit end
}
public void b(EntityHuman entityhuman) {
-@@ -53,6 +79,7 @@
+@@ -53,6 +81,7 @@
}
public boolean a(EntityHuman entityhuman) {
@@ -59,7 +61,7 @@
return this.g.getType(this.h).getBlock() != Blocks.CRAFTING_TABLE ? false : entityhuman.e((double) this.h.getX() + 0.5D, (double) this.h.getY() + 0.5D, (double) this.h.getZ() + 0.5D) <= 64.0D;
}
-@@ -101,4 +128,17 @@
+@@ -101,4 +130,17 @@
public boolean a(ItemStack itemstack, Slot slot) {
return slot.inventory != this.resultInventory && super.a(itemstack, slot);
}