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;