use of de.canitzp.metalworks.machine.blastfurnace.RecipeBlastFurnace in project Metalworks by canitzp.
the class Metalworks method postInit.
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event) {
SimpleSteelRecipeHandler.addBlastFurnaceRecipe(new RecipeBlastFurnace(new OreDictStack("ingotIron").setStacksize(2), new OreDictStack(Items.COAL).setStacksize(3), OreDictStack.EMPTY, new ItemStack(Registry.steelIngot), ItemStack.EMPTY, 0, 400, -1));
SimpleSteelRecipeHandler.addBlastFurnaceRecipe(new RecipeBlastFurnace(new OreDictStack("ingotIron").setStacksize(3), new OreDictStack("gemDiamond"), OreDictStack.EMPTY, new ItemStack(Registry.metalShielding, 4), new ItemStack(Items.IRON_NUGGET), 25, 250, -1));
// Generic Crusher
for (String name : OreDictionary.getOreNames()) {
if (name.startsWith("ore")) {
String dustName = name.replaceFirst("ore", "dust");
NonNullList<ItemStack> oreEntries = OreDictionary.getOres(dustName);
if (!oreEntries.isEmpty()) {
ItemStack dust = oreEntries.get(0).copy();
dust.setCount(2);
MACHINE_RECIPE_REGISTRY.register(new RecipeCrusher(name + "_" + dustName, new OreDictStack(name), dust, ItemStack.EMPTY, 0, 200, 0));
}
} else if (name.startsWith("ingot")) {
String dustName = name.replaceFirst("ingot", "dust");
NonNullList<ItemStack> oreEntries = OreDictionary.getOres(dustName);
if (!oreEntries.isEmpty()) {
ItemStack dust = oreEntries.get(0).copy();
dust.setCount(1);
MACHINE_RECIPE_REGISTRY.register(new RecipeCrusher(name + "_" + dustName, new OreDictStack(name), dust, ItemStack.EMPTY, 0, 150, 0));
}
}
}
}
Aggregations