public void HandleSetSlot(MinecraftClient client, IPacket packet) { var myPacket = (CBSetSlot)packet; var myItem = Item.ItemFromSlot(myPacket.Slotdata); if (myPacket.WindowID == 0) { client.ThisPlayer.SetInventory(myItem, myPacket.Slot); client.RaiseInventoryItem(myPacket.Slot, myItem); } else client.RaiseSetWindowSlot(myPacket.WindowID, myPacket.Slot, myItem); }