Package tconstruct.library.modifier

Examples of tconstruct.library.modifier.IModifyable


    @Override
    protected boolean canModify (ItemStack tool, ItemStack[] input)
    {
        if (tool.getItem() instanceof IModifyable)
        {
            IModifyable toolItem = (IModifyable) tool.getItem();
            if (!validType(toolItem))
                return false;

            if (matchingAmount(input) > max)
                return false;

            NBTTagCompound tags = tool.getTagCompound().getCompoundTag(toolItem.getBaseTagName());
            if (!tags.hasKey(key))
                return tags.getInteger("Modifiers") > 0 && matchingAmount(input) <= max;

            int keyPair[] = tags.getIntArray(key);
            if (keyPair[0] + matchingAmount(input) <= keyPair[1])
View Full Code Here


    }

    @Override
    public void modify (ItemStack[] input, ItemStack tool)
    {
        IModifyable toolItem = (IModifyable) tool.getItem();
        NBTTagCompound tags = tool.getTagCompound().getCompoundTag(toolItem.getBaseTagName());
        if (tags.hasKey(key))
        {
            int[] keyPair = tags.getIntArray(key);
            int increase = matchingAmount(input);
View Full Code Here

TOP

Related Classes of tconstruct.library.modifier.IModifyable

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.