This commit is contained in:
Adrian Siekierka 2017-04-08 10:10:34 +02:00
parent bfa69a2ef3
commit 54eb54d59a

View file

@ -101,14 +101,18 @@ public class TileRefinery extends TileBuildCraft implements IFluidHandler, IHasW
return;
}
if (getBattery().useEnergy(craftingResult.energyCost, craftingResult.energyCost, false) > 0) {
CraftingResult<FluidStack> r = currentRecipe.craft(this, false);
if (getBattery().useEnergy(craftingResult.energyCost, craftingResult.energyCost, true) > 0) {
CraftingResult<FluidStack> r = currentRecipe.craft(this, true);
if (r != null && r.crafted != null) {
getBattery().useEnergy(craftingResult.energyCost, craftingResult.energyCost, false);
r = currentRecipe.craft(this, false);
if (r != null && r.crafted != null) {
// Shouldn't really happen, but its not properly documented
result.fill(r.crafted.copy(), true);
}
}
}
}
@Override
public boolean hasWork() {