Add logic to lock rolling machine, allows it to be automated. Closes #1412
This commit is contained in:
parent
c17f232bf8
commit
ec56914ea7
2 changed files with 132 additions and 35 deletions
|
@ -135,16 +135,25 @@ public class RollingMachineRecipe {
|
|||
recipes.put(resourceLocation, new ShapelessRecipes("", output, ingredients));
|
||||
}
|
||||
|
||||
public ItemStack findMatchingRecipe(InventoryCrafting inv, World world) {
|
||||
public ItemStack findMatchingRecipeOutput(InventoryCrafting inv, World world) {
|
||||
for (IRecipe irecipe : recipes.values()) {
|
||||
if (irecipe.matches(inv, world)) {
|
||||
return irecipe.getCraftingResult(inv);
|
||||
}
|
||||
}
|
||||
|
||||
return ItemStack.EMPTY;
|
||||
}
|
||||
|
||||
public IRecipe findMatchingRecipe(InventoryCrafting inv, World world) {
|
||||
for (IRecipe irecipe : recipes.values()) {
|
||||
if (irecipe.matches(inv, world)) {
|
||||
return irecipe;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
public HashMap<ResourceLocation, IRecipe> getRecipeList() {
|
||||
return recipes;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue