From 83b4eccbd16546466f24765fc9abea4ff06c104a Mon Sep 17 00:00:00 2001 From: Raoul Van den Berge Date: Tue, 13 Sep 2016 02:41:25 +0200 Subject: [PATCH] Fix name --- .../api/solderer/ISoldererRegistry.java | 4 ++-- .../apiimpl/solderer/SoldererRegistry.java | 11 +++++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/main/java/refinedstorage/api/solderer/ISoldererRegistry.java b/src/main/java/refinedstorage/api/solderer/ISoldererRegistry.java index 2b6f49cbb..be0b22de5 100755 --- a/src/main/java/refinedstorage/api/solderer/ISoldererRegistry.java +++ b/src/main/java/refinedstorage/api/solderer/ISoldererRegistry.java @@ -20,11 +20,11 @@ public interface ISoldererRegistry { /** * Returns a solderer recipe from the rows. * - * @param row an item handler, where slots 0 - 2 are the rows + * @param rows an item handler, where slots 0 - 2 are the rows * @return the {@link ISoldererRecipe}, or null if no recipe was found */ @Nullable - ISoldererRecipe getRecipe(@Nonnull IItemHandler row); + ISoldererRecipe getRecipe(@Nonnull IItemHandler rows); /** * @return a list with all the solderer recipes, do NOT modify diff --git a/src/main/java/refinedstorage/apiimpl/solderer/SoldererRegistry.java b/src/main/java/refinedstorage/apiimpl/solderer/SoldererRegistry.java index 73214aefc..b7518343a 100755 --- a/src/main/java/refinedstorage/apiimpl/solderer/SoldererRegistry.java +++ b/src/main/java/refinedstorage/apiimpl/solderer/SoldererRegistry.java @@ -1,5 +1,6 @@ package refinedstorage.apiimpl.solderer; +import net.minecraft.item.ItemStack; import net.minecraftforge.items.IItemHandler; import refinedstorage.api.solderer.ISoldererRecipe; import refinedstorage.api.solderer.ISoldererRegistry; @@ -20,17 +21,19 @@ public class SoldererRegistry implements ISoldererRegistry { @Override @Nullable - public ISoldererRecipe getRecipe(@Nonnull IItemHandler row) { + public ISoldererRecipe getRecipe(@Nonnull IItemHandler rows) { for (ISoldererRecipe recipe : recipes) { boolean found = true; for (int i = 0; i < 3; ++i) { - if (!CompareUtils.compareStackNoQuantity(recipe.getRow(i), row.getStackInSlot(i)) && !CompareUtils.compareStackOreDict(recipe.getRow(i), row.getStackInSlot(i))) { + if (!CompareUtils.compareStackNoQuantity(recipe.getRow(i), rows.getStackInSlot(i)) && !CompareUtils.compareStackOreDict(recipe.getRow(i), rows.getStackInSlot(i))) { found = false; } - if (row.getStackInSlot(i) != null && recipe.getRow(i) != null) { - if (row.getStackInSlot(i).stackSize < recipe.getRow(i).stackSize) { + ItemStack row = recipe.getRow(i); + + if (rows.getStackInSlot(i) != null && row != null) { + if (rows.getStackInSlot(i).stackSize < row.stackSize) { found = false; } }