Moved Recipe Registration to Init, Added Recipe Baking.

This commit is contained in:
AlgorithmX2
2014-07-25 17:49:49 -05:00
parent 846e8a0384
commit 31cb594f4d
10 changed files with 135 additions and 63 deletions
+6 -1
View File
@@ -12,6 +12,7 @@ import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
import com.google.common.collect.HashMultimap;
import com.sun.xml.internal.bind.v2.runtime.unmarshaller.Loader;
import net.minecraft.item.ItemStack;
import appeng.api.AEApi;
@@ -32,6 +33,7 @@ import appeng.items.misc.ItemCrystalSeed;
import appeng.items.parts.ItemMultiPart;
import appeng.recipes.handlers.IWebsiteSeralizer;
import appeng.recipes.handlers.OreRegistration;
import cpw.mods.fml.common.LoaderState;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.GameRegistry.UniqueIdentifier;
@@ -77,8 +79,11 @@ public class RecipeHandler implements IRecipeHandler
}
@Override
public void registerHandlers()
public void injectRecipes()
{
if ( cpw.mods.fml.common.Loader.instance().hasReachedState( LoaderState.POSTINITIALIZATION ))
throw new RuntimeException("Recipes must now be loaded in Init.");
HashMap<Class, Integer> processed = new HashMap<Class, Integer>();
try
{