From 45cd36e553dc7bfa501ec2efca1c9e2f36c370a2 Mon Sep 17 00:00:00 2001 From: FearThe1337 Date: Tue, 9 Dec 2014 20:44:59 +0100 Subject: Fix a client crash issue involving maps. --- nms-patches/ContainerWorkbench.patch | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'nms-patches') 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); } -- cgit v1.2.3