Skip to content

Commit

Permalink
Merge pull request #478 from way2muchnoise/master
Browse files Browse the repository at this point in the history
fixes gems getting overriden by their dust form
  • Loading branch information
jakimfett committed Nov 26, 2014
2 parents 22f016a + 04a441a commit fb7c7c5
Showing 1 changed file with 14 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void handle(String oreName)
case crystal:
case gem:
DecomposerRecipe.createAndAddRecipeSafely(oreName, ore.getComposition());
SynthesisRecipe.createAndAddRecipeSafely(oreName, false, MinechemRecipes.COST_GEM, ore.getComposition());
SynthesisRecipe.createAndAddRecipeSafely(oreName, true, MinechemRecipes.COST_GEM, startAtRow(2, ore.getComposition()));
break;
default:
LogHelper.debug(OreDictionaryDefaultHandler.class.getSimpleName() + " : Invalid ore dictionary type.");
Expand All @@ -118,6 +118,19 @@ public void handle(String oreName)
seen(ore, prefix);
}

private PotionChemical[] startAtRow(int row, PotionChemical[] composition)
{
PotionChemical[] array = new PotionChemical[9];
int j = 0;
for (int i = (row * 3) -1; i < array.length; i++)
{
array[i] = composition[j];
if (++j >= composition.length)
break;
}
return array;
}

private void unregisterIngot(OreDictionaryBaseOreEnum ore)
{
if (registeredIngots.containsKey(ore))
Expand Down

0 comments on commit fb7c7c5

Please sign in to comment.