mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-15 20:23:53 -07:00
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.
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user