diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2013-03-16 13:14:09 -0500 |
---|---|---|
committer | Travis Watkins <amaranth@ubuntu.com> | 2013-03-16 13:14:09 -0500 |
commit | 6d88d545e9a516bf5e7fed3190fc5680e4d9b908 (patch) | |
tree | 40c463bd0adca2664cb7139c5985c6065752ccef /src/main/java/net/minecraft/server/PlayerConnection.java | |
parent | a76a5bd36f052470d2f4112f7de9286dabbc2f12 (diff) | |
download | craftbukkit-6d88d545e9a516bf5e7fed3190fc5680e4d9b908.tar craftbukkit-6d88d545e9a516bf5e7fed3190fc5680e4d9b908.tar.gz craftbukkit-6d88d545e9a516bf5e7fed3190fc5680e4d9b908.tar.lz craftbukkit-6d88d545e9a516bf5e7fed3190fc5680e4d9b908.tar.xz craftbukkit-6d88d545e9a516bf5e7fed3190fc5680e4d9b908.zip |
Filter data for items that shouldn't have it and filter wool.
We used to fall Item.filterData() for this but that method is meant for
converting item data to block data during placement and does the wrong
thing for this case. Instead we just see if the item should have data and
if not set it to zero. We also have to filter wool data explicitly because
clients crash when given invalid wool data.
Diffstat (limited to 'src/main/java/net/minecraft/server/PlayerConnection.java')
-rw-r--r-- | src/main/java/net/minecraft/server/PlayerConnection.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/PlayerConnection.java b/src/main/java/net/minecraft/server/PlayerConnection.java index 10fedeb4..13c27051 100644 --- a/src/main/java/net/minecraft/server/PlayerConnection.java +++ b/src/main/java/net/minecraft/server/PlayerConnection.java @@ -1228,7 +1228,7 @@ public class PlayerConnection extends Connection { this.player.a(this.player.activeContainer, arraylist); // CraftBukkit start - send a Set Slot to update the crafting result slot - if(type == SlotType.RESULT && itemstack != null) { + if (type == SlotType.RESULT && itemstack != null) { this.player.playerConnection.sendPacket((Packet) (new Packet103SetSlot(this.player.activeContainer.windowId, 0, itemstack))); } // CraftBukkit end |