Skip to content

Instantly share code, notes, and snippets.

@copygirl
Created February 4, 2015 16:12
Show Gist options
  • Save copygirl/8ef14dcca28aaec11b9a to your computer and use it in GitHub Desktop.
Save copygirl/8ef14dcca28aaec11b9a to your computer and use it in GitHub Desktop.
public MTShapelessStationRecipe(IIngredient[] ingredients, ItemStack[] output, int experience, int craftingTime) {
super(ingredients.Select(i => new RecipeInputIngredient(i)).toArray(), output);
setRequiredExperience(experience);
setCraftingTime(craftingTime);
}
public MTShapelessStationRecipe(IIngredient[] ingredients, ItemStack[] output, int experience, int craftingTime) {
super(toRecipeInputs(ingredients), output);
setRequiredExperience(experience);
setCraftingTime(craftingTime);
}
private static IRecipeInput[] toRecipeInputs(IIngredient[] ingredients) {
IRecipeInput[] inputs = new IRecipeInput[ingredients.length];
for (int i = 0; i < inputs.length; i++)
inputs[i] = new RecipeInputIngredient(ingredients[i]);
return inputs;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment