Make distillation tower work with different fluids in input hatches

This commit is contained in:
Blood-Asp 2016-06-19 22:02:19 +02:00
parent 91fc3a20cd
commit 2427bc1521

View file

@ -91,9 +91,10 @@ public class GT_MetaTileEntity_DistillationTower
long tVoltage = getMaxInputVoltage(); long tVoltage = getMaxInputVoltage();
byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage)); byte tTier = (byte) Math.max(1, GT_Utility.getTier(tVoltage));
FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tFluidList.size()]), 0, 1); FluidStack[] tFluids = (FluidStack[]) Arrays.copyOfRange(tFluidList.toArray(new FluidStack[tFluidList.size()]), 0, tFluidList.size());
if (tFluids.length > 0) { if (tFluids.length > 0) {
GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sDistillationRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], tFluids, new ItemStack[]{}); for(int i = 0;i<tFluids.length;i++){
GT_Recipe tRecipe = GT_Recipe.GT_Recipe_Map.sDistillationRecipes.findRecipe(getBaseMetaTileEntity(), false, gregtech.api.enums.GT_Values.V[tTier], new FluidStack[]{tFluids[i]}, new ItemStack[]{});
if (tRecipe != null) { if (tRecipe != null) {
if (tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[]{})) { if (tRecipe.isRecipeInputEqual(true, tFluids, new ItemStack[]{})) {
this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000); this.mEfficiency = (10000 - (getIdealStatus() - getRepairStatus()) * 1000);
@ -121,6 +122,7 @@ public class GT_MetaTileEntity_DistillationTower
} }
} }
} }
}
return false; return false;
} }