Deep copy ore dictionary list

prevents ore dictionary from being modified (
This commit is contained in:
greenchem4 committed 2015-02-24 00:39:29 -05:00
1 parent 50484ea983
commit 4739ff0d2b
1 file changed
+5 -3
@@ -54,10 +54,12 @@ public class OreDictionaryRecipeInput extends RecipeInput {
if(res == null || res.isEmpty()) {
return null;
}
for(ItemStack st : res) {
st.stackSize = getInput().stackSize;
ItemStack[] res2 = res.toArray(new ItemStack[res.size()]);
for(int i = 0; i < res.size(); ++i) {
res2[i] = res2[i].copy();
res2[i].stackSize = getInput().stackSize;
}
return res.toArray(new ItemStack[res.size()]);
return res2;
}
@Override