@Override public void onPickupFromSlot(EntityPlayer entityplayer, ItemStack itemstack) { if (getSlotIndex() >= InventoryAlchemy.SLOT_RESULT_START) { System.out.println("Taking result"); ((InventoryAlchemy) inventory).onResultTaken(itemstack); } else if (getSlotIndex() == InventoryAlchemy.SLOT_CATALYST || getSlotIndex() == InventoryAlchemy.SLOT_MODIFIER) { ((InventoryAlchemy) inventory).onCatalystOrModifierTaken(itemstack, this); } // super.onPickupFromSlot(entityplayer, itemstack); }
@Override public void onSlotChanged() { super.onSlotChanged(); if (worldObj.isRemote) { return; } if (getSlotIndex() < InventoryAlchemy.SLOT_RESULT_START) { System.out.println("Checking for result"); ((InventoryAlchemy) inventory).checkForResult(worldObj.rand); sendResultToClient(); } }