Skip to content

Commit

Permalink
Fix #1639 Thermionic Fabricator & Glass Pane
Browse files Browse the repository at this point in the history
  • Loading branch information
Nedelosk committed Mar 26, 2017
1 parent 4a31215 commit 2c9a30d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Expand Up @@ -30,6 +30,7 @@

public class FabricatorRecipeManager implements IFabricatorManager {

public static final Pair EMPTY_RECIPE = Pair.of(null, null);
private static final Set<IFabricatorRecipe> recipes = new HashSet<>();

@Override
Expand All @@ -55,7 +56,7 @@ public static Pair<IFabricatorRecipe, String[][]> findMatchingRecipe(ItemStack p
}
}

return Pair.of(null, null);
return EMPTY_RECIPE;
}

public static boolean isPlan(ItemStack plan) {
Expand Down
7 changes: 3 additions & 4 deletions src/main/java/forestry/factory/tiles/TileFabricator.java
Expand Up @@ -178,9 +178,8 @@ private Pair<IFabricatorRecipe, String[][]> getRecipe() {
return recipePair;
}

public ItemStack getResult() {
IFabricatorRecipe myRecipe = getRecipe().getLeft();

public ItemStack getResult(Pair<IFabricatorRecipe, String[][]> myRecipePair) {
IFabricatorRecipe myRecipe = myRecipePair.getLeft();
if (myRecipe == null) {
return ItemStack.EMPTY;
}
Expand All @@ -198,7 +197,7 @@ public void onTake(int slotIndex, EntityPlayer player) {

private void craftResult() {
Pair<IFabricatorRecipe, String[][]> myRecipePair = getRecipe();
ItemStack craftResult = getResult();
ItemStack craftResult = getResult(myRecipePair);
IFabricatorRecipe myRecipe = myRecipePair.getLeft();
if (myRecipe != null && !craftResult.isEmpty() && getStackInSlot(InventoryFabricator.SLOT_RESULT).isEmpty()) {
FluidStack liquid = myRecipe.getLiquid();
Expand Down

0 comments on commit 2c9a30d

Please sign in to comment.