Skip to content

Commit

Permalink
fixes #550
Browse files Browse the repository at this point in the history
  • Loading branch information
way2muchnoise committed Jan 1, 2015
1 parent 94498ea commit dcc3673
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ private PotionChemical[] scaleFloor(PotionChemical[] composition, double factor)
{
PotionChemical newChem = chem.copy();
newChem.amount = (int) Math.floor(chem.amount * factor);
newComposition.add(newChem);
if (newChem.amount > 0) newComposition.add(newChem);
}

return newComposition.toArray(new PotionChemical[newComposition.size()]);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,12 @@ public static void removeRecipeSafely(String item)

public static void createAndAddRecipeSafely(String item, PotionChemical... chemicals)
{
for (ItemStack i : OreDictionary.getOres(item))
if (chemicals.length > 0)
{
DecomposerRecipe.add(new DecomposerRecipe(new ItemStack(i.getItem(), 1, i.getItemDamage()), chemicals));
for (ItemStack i : OreDictionary.getOres(item))
{
DecomposerRecipe.add(new DecomposerRecipe(new ItemStack(i.getItem(), 1, i.getItemDamage()), chemicals));
}
}
}

Expand Down

0 comments on commit dcc3673

Please sign in to comment.