geforkt von Mirrors/Paper
Fix a client crash issue involving maps.
By: FearThe1337 <admin@fearthe1337.com>
Dieser Commit ist enthalten in:
Ursprung
e8d166605c
Commit
4a80093c07
@ -1,5 +1,5 @@
|
|||||||
--- ../work/decompile-8eb82bde//net/minecraft/server/ContainerWorkbench.java 2014-11-28 17:43:43.021707437 +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-11-28 17:38:17.000000000 +0000
|
+++ src/main/java/net/minecraft/server/ContainerWorkbench.java 2014-12-09 20:39:42.000000000 +0100
|
||||||
@@ -1,13 +1,28 @@
|
@@ -1,13 +1,28 @@
|
||||||
package net.minecraft.server;
|
package net.minecraft.server;
|
||||||
|
|
||||||
@ -31,7 +31,7 @@
|
|||||||
this.g = world;
|
this.g = world;
|
||||||
this.h = blockposition;
|
this.h = blockposition;
|
||||||
this.a((Slot) (new SlotResult(playerinventory.player, this.craftInventory, this.resultInventory, 0, 124, 35)));
|
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) {
|
public void a(IInventory iinventory) {
|
||||||
@ -44,14 +44,16 @@
|
|||||||
+ if (super.listeners.size() < 1) {
|
+ if (super.listeners.size() < 1) {
|
||||||
+ return;
|
+ 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.
|
+ 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));
|
+ player.playerConnection.sendPacket(new PacketPlayOutSetSlot(player.activeContainer.windowId, 0, craftResult));
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
}
|
}
|
||||||
|
|
||||||
public void b(EntityHuman entityhuman) {
|
public void b(EntityHuman entityhuman) {
|
||||||
@@ -53,6 +79,7 @@
|
@@ -53,6 +81,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean a(EntityHuman entityhuman) {
|
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;
|
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) {
|
public boolean a(ItemStack itemstack, Slot slot) {
|
||||||
return slot.inventory != this.resultInventory && super.a(itemstack, slot);
|
return slot.inventory != this.resultInventory && super.a(itemstack, slot);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren