Examples of ICokeOvenRecipe


Examples of mods.railcraft.api.crafting.ICokeOvenRecipe

                ItemStack input = getStackInSlot(SLOT_INPUT);
                if (input != null && input.stackSize > 0 && !InvTools.isSynthetic(input)) {
                    if (!paused && clock % COOK_STEP_LENGTH == 0) {
                        ItemStack output = getStackInSlot(SLOT_OUTPUT);
                        ICokeOvenRecipe recipe = RailcraftCraftingManager.cokeOven.getRecipe(input);

                        if (recipe != null)
                            if ((output == null || (output.isItemEqual(recipe.getOutput()) && output.stackSize + recipe.getOutput().stackSize <= output.getMaxStackSize()))
                                    && tank.fill(recipe.getFluidOutput(), false) >= recipe.getFluidOutput().amount) {
                                cookTimeTotal = recipe.getCookTime();
                                cookTime += COOK_STEP_LENGTH;
                                setCooking(true);

                                if (cookTime >= recipe.getCookTime()) {
                                    cookTime = 0;
                                    finishedAt = clock;
                                    decrStackSize(SLOT_INPUT, 1);
                                    if (output == null)
                                        setInventorySlotContents(SLOT_OUTPUT, recipe.getOutput());
                                    else
                                        output.stackSize += recipe.getOutput().stackSize;
                                    tank.fill(recipe.getFluidOutput(), true);
                                    sendUpdateToClient();
                                }

                            } else {
                                cookTime = 0;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.