예제 #1
0
        private void updateItem()
        {
            if (progression >= currentRecipe.GetCookTime() && energy.ConsumeEnergy(50) == 50)
            {
                inputItem.stack -= currentRecipe.GetIngredientStack();

                Item result = currentRecipe.GetResult().Clone();

                if (outputItem.IsAir)
                {
                    outputItem = result;
                }
                else
                {
                    outputItem.stack++;
                }

                currentRecipe = null;
                progression   = 0;
            }
        }
예제 #2
0
        /*****************************************************************/
        /*                         TIME FOR FUN :D                       */
        /*****************************************************************/

        private void UpdateItem()
        {
            if (progression >= cookTimer && fuel.getCurrentEnergyLevel() > 0)
            {
                inputItem.stack -= currentRecipe.GetIngredientStack();

                Item result = currentRecipe.GetResult().Clone();

                if (outputItem.IsAir)
                {
                    _outputItem.Value = result;
                }
                else
                {
                    outputItem.stack++;
                }

                fuel.ConsumeEnergy(1);
                currentRecipe = null;
                progression   = 0;
            }
        }