Package mrtjp.projectred.core

Source Code of mrtjp.projectred.core.NEIProjectRedConfig

package mrtjp.projectred.core;

import codechicken.nei.api.API;
import codechicken.nei.api.IConfigureNEI;
import codechicken.nei.recipe.ICraftingHandler;
import codechicken.nei.recipe.IRecipeHandler;
import codechicken.nei.recipe.IUsageHandler;
import mrtjp.projectred.core.libmc.recipe.PRShapedRecipeHandler;
import mrtjp.projectred.core.libmc.recipe.PRShapelessRecipeHandler;

public class NEIProjectRedConfig implements IConfigureNEI
{
    @Override
    public void loadConfig()
    {
        try
        {
            reg(new PRShapedRecipeHandler());
            reg(new PRShapelessRecipeHandler());
        }
        catch (Throwable e)
        {
            e.printStackTrace();
        }
    }

    private void reg(IRecipeHandler h)
    {
        API.registerUsageHandler((IUsageHandler)h);
        API.registerRecipeHandler((ICraftingHandler)h);
    }

    @Override
    public String getName()
    {
        return "Project Red";
    }

    @Override
    public String getVersion()
    {
        return Configurator.version + "." + Configurator.buildnumber;
    }
}
TOP

Related Classes of mrtjp.projectred.core.NEIProjectRedConfig

TOP
Copyright © 2018 www.massapi.com. 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.