Fix BasicMachines accepting wrong items in certain conditions
This commit is contained in:
parent
899973b0dc
commit
a625088776
1 changed files with 11 additions and 15 deletions
|
@ -555,14 +555,10 @@ public class GT_MetaTileEntity_BasicMachine_GT_Recipe extends GT_MetaTileEntity_
|
||||||
if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) return false;
|
if (!super.allowPutStack(aBaseMetaTileEntity, aIndex, aSide, aStack)) return false;
|
||||||
if (mInventory[aIndex] != null) return true;
|
if (mInventory[aIndex] != null) return true;
|
||||||
switch (mInputSlotCount) {
|
switch (mInputSlotCount) {
|
||||||
case 0:
|
case 0: return false;
|
||||||
return false;
|
case 1: return getFillableStack() == null ? !mRequiresFluidForFiltering && getRecipeList().containsInput(aStack) : null!=getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, V[mTier], new FluidStack[] {getFillableStack()}, getSpecialSlot(), new ItemStack[] {aStack});
|
||||||
case 1:
|
case 2: return (!mRequiresFluidForFiltering || getFillableStack() != null) && (((getInputAt(0)!=null&&getInputAt(1)!=null) || (getInputAt(0)==null&&getInputAt(1)==null?getRecipeList().containsInput(aStack):(getRecipeList().containsInput(aStack)&&null!=getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, V[mTier], new FluidStack[] {getFillableStack()}, getSpecialSlot(), aIndex == getInputSlot() ? new ItemStack[] {aStack, getInputAt(1)} : new ItemStack[] {getInputAt(0), aStack})))));
|
||||||
return getFillableStack() == null ? !mRequiresFluidForFiltering && getRecipeList().containsInput(aStack) : null != getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), new ItemStack[]{aStack});
|
default: return getRecipeList().containsInput(aStack);
|
||||||
case 2:
|
|
||||||
return (!mRequiresFluidForFiltering || getFillableStack() != null) && (((getInputAt(0) != null && getInputAt(1) != null) || (getInputAt(0) == null && getInputAt(1) == null ? getRecipeList().containsInput(aStack) : null != getRecipeList().findRecipe(getBaseMetaTileEntity(), mLastRecipe, true, V[mTier], new FluidStack[]{getFillableStack()}, getSpecialSlot(), aIndex == getInputSlot() ? new ItemStack[]{aStack, getInputAt(1)} : new ItemStack[]{getInputAt(0), aStack}))));
|
|
||||||
default:
|
|
||||||
return getRecipeList().containsInput(aStack);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue