Package pneumaticCraft.common.progwidgets

Examples of pneumaticCraft.common.progwidgets.ProgWidgetItemFilter


    private ProgWidgetItemFilter getItemFilter(String itemName, int damage, boolean useMetadata, boolean useNBT, boolean useOreDict, boolean useModSimilarity) throws IllegalArgumentException{
        if(!itemName.contains(":")) throw new IllegalArgumentException("Item/Block name doesn't contain a ':'!");
        String[] itemParts = itemName.split(":");
        Item item = GameRegistry.findItem(itemParts[0], itemParts[1]);
        if(item == null) throw new IllegalArgumentException("Item not found for the name \"" + itemName + "\"!");
        ProgWidgetItemFilter itemFilter = new ProgWidgetItemFilter();
        itemFilter.filter = new ItemStack(item, 1, damage);
        itemFilter.specificMeta = damage;
        itemFilter.useMetadata = useMetadata;
        itemFilter.useNBT = useNBT;
        itemFilter.useOreDict = useOreDict;
View Full Code Here

TOP

Related Classes of pneumaticCraft.common.progwidgets.ProgWidgetItemFilter

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.