package org.pfaa;

import java.lang.reflect.Constructor;

import net.minecraft.item.Item;

import org.pfaa.geologica.Geologica;

import com.google.common.base.CaseFormat;

import cpw.mods.fml.common.LoaderException;

public class ItemCatalog {
	protected static <T extends Item> T createItem(Class<T> itemClass) {
		T item = null;
		try {
			Constructor<T> constructor = itemClass.getConstructor();
			item = constructor.newInstance();
		} catch (Exception e) {
			Geologica.log.fatal("Failed to construct item of class " + itemClass.getCanonicalName());
			throw new LoaderException(e);
		}
		return item;
	}
}

@@ -16,597 +16,36 @@
 a;%0A%0A
-import java.lang.reflect.Constructor;%0A%0Aimport net.minecraft.item.Item;%0A%0Aimport org.pfaa.geologica.Geologica;%0A%0Aimport com.google.common.base.CaseFormat;%0A%0Aimport cpw.mods.fml.common.LoaderException;%0A%0Apublic class ItemCatalog %7B%0A%09protected static %3CT extends Item%3E T createItem(Class%3CT%3E itemClass) %7B%0A%09%09T item = null;%0A%09%09try %7B%0A%09%09%09Constructor%3CT%3E constructor = itemClass.getConstructor();%0A%09%09%09item = constructor.newInstance();%0A%09%09%7D catch (Exception e) %7B%0A%09%09%09Geologica.log.fatal(%22Failed to construct item of class %22 + itemClass.getCanonicalName());%0A%09%09%09throw new LoaderException(e);%0A%09%09%7D%0A%09%09return item;%0A%09%7D
+%0Apublic class ItemCatalog %7B%0A%09
 %0A%7D%0A

remove unused item construction utility