public override void func_20007_a(Packet102 packet102) { if (playerEntity.currentCraftingInventory.windowId == packet102.window_Id && playerEntity.currentCraftingInventory.getCanCraft(playerEntity)) { ItemStack itemstack = playerEntity.currentCraftingInventory.placeItem(packet102.inventorySlot, packet102.mouseClick, playerEntity); if (ItemStack.areItemStacksEqual(packet102.itemStack, itemstack)) { playerEntity.playerNetServerHandler.sendPacket(new Packet106(packet102.window_Id, packet102.action, true)); playerEntity.isChangingQuantityOnly = true; playerEntity.currentCraftingInventory.updateCraftingMatrix(); playerEntity.updateHeldItem(); playerEntity.isChangingQuantityOnly = false; } else { field_10_k.put(Integer.valueOf(playerEntity.currentCraftingInventory.windowId), Short.valueOf(packet102.action)); playerEntity.playerNetServerHandler.sendPacket(new Packet106(packet102.window_Id, packet102.action, false)); playerEntity.currentCraftingInventory.setCanCraft(playerEntity, false); var arraylist = new ArrayList(); for (int i = 0; i < playerEntity.currentCraftingInventory.inventorySlots.size(); i++) { arraylist.add(((Slot)playerEntity.currentCraftingInventory.inventorySlots.get(i)).getStack()); } playerEntity.updateCraftingInventory(playerEntity.currentCraftingInventory, arraylist); } } }
public override void func_20007_a(Packet102 packet102) { if (playerEntity.currentCraftingInventory.windowId == packet102.window_Id && playerEntity.currentCraftingInventory.getCanCraft(playerEntity)) { ItemStack itemstack = playerEntity.currentCraftingInventory.placeItem(packet102.inventorySlot, packet102.mouseClick, playerEntity); if (ItemStack.areItemStacksEqual(packet102.itemStack, itemstack)) { playerEntity.playerNetServerHandler.sendPacket(new Packet106(packet102.window_Id, packet102.action, true)); playerEntity.isChangingQuantityOnly = true; playerEntity.currentCraftingInventory.updateCraftingMatrix(); playerEntity.updateHeldItem(); playerEntity.isChangingQuantityOnly = false; } else { field_10_k.put(Integer.valueOf(playerEntity.currentCraftingInventory.windowId), Short.valueOf(packet102.action)); playerEntity.playerNetServerHandler.sendPacket(new Packet106(packet102.window_Id, packet102.action, false)); playerEntity.currentCraftingInventory.setCanCraft(playerEntity, false); var arraylist = new ArrayList(); for (int i = 0; i < playerEntity.currentCraftingInventory.inventorySlots.size(); i++) { arraylist.add(((Slot) playerEntity.currentCraftingInventory.inventorySlots.get(i)).getStack()); } playerEntity.updateCraftingInventory(playerEntity.currentCraftingInventory, arraylist); } } }