Package mekanism.common.IFactory

Examples of mekanism.common.IFactory.RecipeType


      handleSecondaryFuel();
      sortInventory();

      if(inventory[2] != null && inventory[3] == null)
      {
        RecipeType toSet = null;

        for(RecipeType type : RecipeType.values())
        {
          if(inventory[2].isItemEqual(type.getStack()))
          {
            toSet = type;
            break;
          }
        }

        if(toSet != null && recipeType != toSet.ordinal())
        {
          if(recipeTicks < RECIPE_TICKS_REQUIRED)
          {
            recipeTicks++;
          }
          else if(recipeTicks == RECIPE_TICKS_REQUIRED)
          {
            recipeTicks = 0;
           
            ItemStack returnStack = getMachineStack();
            IUpgradeManagement mgmt = (IUpgradeManagement)inventory[2].getItem();
           
            ((IUpgradeManagement)returnStack.getItem()).setEnergyMultiplier(mgmt.getEnergyMultiplier(inventory[2]), returnStack);
            ((IUpgradeManagement)returnStack.getItem()).setSpeedMultiplier(mgmt.getSpeedMultiplier(inventory[2]), returnStack);

            inventory[2] = null;
            inventory[3] = returnStack;

            recipeType = toSet.ordinal();
            gasTank.setGas(null);

            worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockType());

            MekanismUtils.saveChunk(this);
View Full Code Here

TOP

Related Classes of mekanism.common.IFactory.RecipeType

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.