Package mods.railcraft.api.crafting

Examples of mods.railcraft.api.crafting.IBlastFurnaceRecipe


    }

    @Override
    public int getTotalCookTime() {
        ItemStack input = getStackInSlot(SLOT_INPUT);
        IBlastFurnaceRecipe recipe = RailcraftCraftingManager.blastFurnace.getRecipe(input);
        if (recipe != null)
            return recipe.getCookTime();
        return 1;
    }
View Full Code Here


            ItemStack input = getStackInSlot(SLOT_INPUT);
            if (input != null && input.stackSize > 0) {

                ItemStack output = getStackInSlot(SLOT_OUTPUT);
                IBlastFurnaceRecipe recipe = RailcraftCraftingManager.blastFurnace.getRecipe(input);

                if (recipe != null && recipe.isRoomForOutput(output)) {
                    if (paused) return;

                    if (burnTime <= FUEL_PER_TICK * 2) {
                        ItemStack fuel = getStackInSlot(SLOT_FUEL);
                        if (FUEL_FILTER.matches(fuel)) {
                            int itemBurnTime = FuelPlugin.getBurnTime(fuel);
                            if (itemBurnTime > 0) {
                                currentItemBurnTime = itemBurnTime + burnTime;
                                burnTime = currentItemBurnTime;
                                setInventorySlotContents(SLOT_FUEL, InvTools.depleteItem(fuel));
                            }
                        }
                    }

                    if (isBurning()) {
                        cookTime++;
                        setCooking(true);

                        if (cookTime >= recipe.getCookTime()) {
                            cookTime = 0;
                            finishedAt = clock;
                            if (output == null)
                                setInventorySlotContents(SLOT_OUTPUT, recipe.getOutput());
                            else
                                output.stackSize += recipe.getOutputStackSize();
                            decrStackSize(SLOT_INPUT, 1);
                        }
                    }
                } else {
                    cookTime = 0;
View Full Code Here

TOP

Related Classes of mods.railcraft.api.crafting.IBlastFurnaceRecipe

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.