Archiviert
13
0

Fix a client crash issue involving maps.

Dieser Commit ist enthalten in:
FearThe1337 2014-12-09 20:44:59 +01:00 committet von md_5
Ursprung c13e6e69a2
Commit 45cd36e553

Datei anzeigen

@ -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);
}