private void smokeBlock(int x, int y, int z) { if (worldObj.blockExists(x, y, z) && worldObj.getBlock(x, y, z) == TFCBlocks.smokeRack) { TESmokeRack te = (TESmokeRack) worldObj.getTileEntity(x, y, z); te.lastSmokedTime = (int) TFC_Time.getTotalHours(); if (te.getStackInSlot(0) != null) { ItemStack is = te.getStackInSlot(0); if (Food.getSmokeCounter(is) < Food.SMOKEHOURS) Food.setSmokeCounter(is, Food.getSmokeCounter(is) + 1); else Food.setFuelProfile(is, EnumFuelMaterial.getFuelProfile(fuelTasteProfile)); } if (te.getStackInSlot(1) != null) { ItemStack is = te.getStackInSlot(1); if (Food.getSmokeCounter(is) < Food.SMOKEHOURS) Food.setSmokeCounter(is, Food.getSmokeCounter(is) + 1); else Food.setFuelProfile(is, EnumFuelMaterial.getFuelProfile(fuelTasteProfile)); } } }