2014-02-11 06:51:25 +01:00
|
|
|
package appeng.recipes.handlers;
|
|
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
|
|
import net.minecraft.item.ItemStack;
|
|
|
|
import net.minecraftforge.oredict.OreDictionary;
|
2014-02-20 00:33:36 +01:00
|
|
|
import appeng.api.exceptions.MissingIngredientError;
|
|
|
|
import appeng.api.exceptions.RecipeError;
|
|
|
|
import appeng.api.exceptions.RegistrationError;
|
|
|
|
import appeng.api.recipes.ICraftHandler;
|
|
|
|
import appeng.api.recipes.IIngredient;
|
2014-02-11 06:51:25 +01:00
|
|
|
|
2014-02-20 00:33:36 +01:00
|
|
|
public class OreRegistration implements ICraftHandler
|
2014-02-11 06:51:25 +01:00
|
|
|
{
|
|
|
|
|
2014-02-20 00:33:36 +01:00
|
|
|
List<IIngredient> inputs;
|
2014-02-11 06:51:25 +01:00
|
|
|
String name;
|
|
|
|
|
2014-02-20 00:33:36 +01:00
|
|
|
public OreRegistration(List<IIngredient> in, String out) {
|
2014-02-11 06:51:25 +01:00
|
|
|
inputs = in;
|
|
|
|
name = out;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void register() throws RegistrationError, MissingIngredientError
|
|
|
|
{
|
2014-02-20 00:33:36 +01:00
|
|
|
for (IIngredient i : inputs)
|
2014-02-11 06:51:25 +01:00
|
|
|
{
|
2014-02-20 00:33:36 +01:00
|
|
|
for (ItemStack is : i.getItemStackSet())
|
2014-02-11 06:51:25 +01:00
|
|
|
{
|
|
|
|
OreDictionary.registerOre( name, is );
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2014-02-20 00:33:36 +01:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void setup(List<List<IIngredient>> input,
|
|
|
|
List<List<IIngredient>> output) throws RecipeError {
|
|
|
|
|
|
|
|
}
|
2014-02-11 06:51:25 +01:00
|
|
|
}
|