use of de.canitzp.metalworks.recipe.OreDictStack 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));
}
}
}
}
use of de.canitzp.metalworks.recipe.OreDictStack in project Metalworks by canitzp.
the class Registry method registerMachineRecipes.
@SubscribeEvent
public static void registerMachineRecipes(RegistryEvent.Register<IMachineRecipe> event) {
IForgeRegistry<IMachineRecipe> reg = event.getRegistry();
// Duster
reg.register(new RecipeDuster("quartz_sand_dust", new OreDictStack("gemQuartz"), new OreDictStack("sand"), new ItemStack(quartzSandDust, 2), 0, 0));
// Crusher
reg.register(new RecipeCrusher("wool_string", new OreDictStack(new ItemStack(Blocks.WOOL, 1, OreDictionary.WILDCARD_VALUE)), new ItemStack(Items.STRING, 2), new ItemStack(Items.STRING), 50, 100, 50));
}
Aggregations