Catch broken items on recipe move

This commit is contained in:
Blood-Asp 2017-05-31 18:10:11 +02:00
parent 40304ed2f5
commit c28a8ceb78

View file

@ -682,8 +682,8 @@ public class GT_ModHandler {
for (ItemStack tStack : ((IRecipeInput) tRecipe.getKey()).getInputs()) { for (ItemStack tStack : ((IRecipeInput) tRecipe.getKey()).getInputs()) {
if (GT_Utility.isStackValid(tStack)) { if (GT_Utility.isStackValid(tStack)) {
if (aAddGTRecipe && (aGTRecipeMap.findRecipe(null, false, Long.MAX_VALUE, null, tStack) == null)) { if (aAddGTRecipe && (aGTRecipeMap.findRecipe(null, false, Long.MAX_VALUE, null, tStack) == null)) {
if (aExcludeGTIC2Items && ((tStack.getUnlocalizedName().contains("gt.metaitem.01") || tStack.getUnlocalizedName().contains("gt.blockores") || tStack.getUnlocalizedName().contains("ic2.itemCrushed") || tStack.getUnlocalizedName().contains("ic2.itemPurifiedCrushed")))) continue;
try{ try{
if (aExcludeGTIC2Items && ((tStack.getUnlocalizedName().contains("gt.metaitem.01") || tStack.getUnlocalizedName().contains("gt.blockores") || tStack.getUnlocalizedName().contains("ic2.itemCrushed") || tStack.getUnlocalizedName().contains("ic2.itemPurifiedCrushed")))) continue;
switch (aGTRecipeMap.mUnlocalizedName) { switch (aGTRecipeMap.mUnlocalizedName) {
case "gt.recipe.macerator": case "gt.recipe.macerator":
aGTRecipeMap.addRecipe(true, new ItemStack[]{GT_Utility.copyAmount(((IRecipeInput) tRecipe.getKey()).getAmount(), tStack)}, (ItemStack[]) ((RecipeOutput) tRecipe.getValue()).items.toArray(), null, null, null, null, 300, 2, 0); aGTRecipeMap.addRecipe(true, new ItemStack[]{GT_Utility.copyAmount(((IRecipeInput) tRecipe.getKey()).getAmount(), tStack)}, (ItemStack[]) ((RecipeOutput) tRecipe.getValue()).items.toArray(), null, null, null, null, 300, 2, 0);