Fix #598 Delete saved recipe on machine change

This commit is contained in:
Blood-Asp 2016-08-22 22:38:28 +02:00
parent 5466ac4f52
commit 9ff430c80d

View file

@ -141,6 +141,7 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
return aFacing > 1; return aFacing > 1;
} }
public String mMachine = "";
public boolean checkRecipe(ItemStack aStack) { public boolean checkRecipe(ItemStack aStack) {
if (!isCorrectMachinePart(mInventory[1])) { if (!isCorrectMachinePart(mInventory[1])) {
return false; return false;
@ -176,6 +177,8 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
tTier = 8; tTier = 8;
} }
if(!mMachine.equals(mInventory[1].getUnlocalizedName()))mLastRecipe=null;
mMachine = mInventory[1].getUnlocalizedName();
ItemStack[] tInputs = (ItemStack[]) tInputList.toArray(new ItemStack[tInputList.size()]); ItemStack[] tInputs = (ItemStack[]) tInputList.toArray(new ItemStack[tInputList.size()]);
ArrayList<FluidStack> tFluidList = getStoredFluids(); ArrayList<FluidStack> tFluidList = getStoredFluids();