Package tconstruct.library.util

Examples of tconstruct.library.util.IPattern


        if (slotID == 4 || slotID == 5)
        {
            if (!craftedTop && inventory[0] != null)
            {
                int value = PatternBuilder.instance.getPartValue(inventory[2]);
                IPattern item = (IPattern) inventory[0].getItem();
                int cost = item != null ? item.getPatternCost(inventory[0]) : 0;
                if (value > 0 && cost > 0)
                {
                    int decrease = cost / value;
                    if (cost % value != 0)
                        decrease++;
                    super.decrStackSize(2, decrease); //Call super to avoid crafting again
                }
            }

            if (inventory[4] != null || inventory[5] != null)
                craftedTop = true;
            else
                craftedTop = false;
        }

        if (!craftedTop)
            buildTopPart();

        if (slotID == 6 || slotID == 7)
        {
            if (!craftedBottom && inventory[1] != null)
            {
                int value = PatternBuilder.instance.getPartValue(inventory[3]);
                IPattern item = (IPattern) inventory[1].getItem();
                int cost = item != null ? item.getPatternCost(inventory[1]) : 0;
                if (value > 0 && cost > 0)
                {
                    int decrease = cost / value;
                    if (cost % value != 0)
                        decrease++;
View Full Code Here

TOP

Related Classes of tconstruct.library.util.IPattern

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.