Exports the ore-dicts out of the recipe files
This will not alter the handler, because rewriting the parser for it being too static is not feasible at this point
This commit is contained in:
@@ -29,6 +29,7 @@ import com.google.common.base.Preconditions;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
|
||||
import appeng.api.recipes.IRecipeHandler;
|
||||
import appeng.api.recipes.IRecipeLoader;
|
||||
import appeng.recipes.loader.ConfigLoader;
|
||||
import appeng.recipes.loader.JarLoader;
|
||||
import appeng.recipes.loader.RecipeResourceCopier;
|
||||
@@ -68,7 +69,11 @@ public class RecipeLoader implements Runnable
|
||||
final File readmeGenDest = new File( generatedRecipesDir, "README.html" );
|
||||
final File readmeUserDest = new File( userRecipesDir, "README.html" );
|
||||
|
||||
// generates generated and user recipes dir
|
||||
final IRecipeLoader oreDictLoader = new JarLoader("/assets/appliedenergistics2/oredict/");
|
||||
this.handler.parseRecipes(oreDictLoader, "vanilla.oredict" );
|
||||
this.handler.parseRecipes(oreDictLoader, "ae2.oredict" );
|
||||
|
||||
// generates generated and user recipes dir
|
||||
// will clean the generated every time to keep it up to date
|
||||
// copies over the recipes in the jar over to the generated folder
|
||||
// copies over the readmes
|
||||
|
||||
@@ -73,16 +73,20 @@ import appeng.recipes.handlers.OreRegistration;
|
||||
*/
|
||||
public class RecipeHandler implements IRecipeHandler
|
||||
{
|
||||
|
||||
public final List<String> tokens = new LinkedList<String>();
|
||||
final RecipeData data;
|
||||
private final List<String> tokens = new LinkedList<String>();
|
||||
|
||||
public RecipeHandler()
|
||||
{
|
||||
this.data = new RecipeData();
|
||||
}
|
||||
|
||||
RecipeHandler( RecipeHandler parent )
|
||||
/**
|
||||
* Called recursively from parent
|
||||
*
|
||||
* @param parent owner of this handler
|
||||
*/
|
||||
private RecipeHandler( RecipeHandler parent )
|
||||
{
|
||||
this.data = parent.data;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user