Skip to content

Commit fb7c7c5

Browse files
committed
Merge pull request #478 from way2muchnoise/master
fixes gems getting overriden by their dust form
2 parents 22f016a + 04a441a commit fb7c7c5

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

src/main/java/minechem/oredictionary/OreDictionaryDefaultHandler.java

+14-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public void handle(String oreName)
108108
case crystal:
109109
case gem:
110110
DecomposerRecipe.createAndAddRecipeSafely(oreName, ore.getComposition());
111-
SynthesisRecipe.createAndAddRecipeSafely(oreName, false, MinechemRecipes.COST_GEM, ore.getComposition());
111+
SynthesisRecipe.createAndAddRecipeSafely(oreName, true, MinechemRecipes.COST_GEM, startAtRow(2, ore.getComposition()));
112112
break;
113113
default:
114114
LogHelper.debug(OreDictionaryDefaultHandler.class.getSimpleName() + " : Invalid ore dictionary type.");
@@ -118,6 +118,19 @@ public void handle(String oreName)
118118
seen(ore, prefix);
119119
}
120120

121+
private PotionChemical[] startAtRow(int row, PotionChemical[] composition)
122+
{
123+
PotionChemical[] array = new PotionChemical[9];
124+
int j = 0;
125+
for (int i = (row * 3) -1; i < array.length; i++)
126+
{
127+
array[i] = composition[j];
128+
if (++j >= composition.length)
129+
break;
130+
}
131+
return array;
132+
}
133+
121134
private void unregisterIngot(OreDictionaryBaseOreEnum ore)
122135
{
123136
if (registeredIngots.containsKey(ore))

0 commit comments

Comments
 (0)