Fix #868 Last tin can won't be consumed by Farm GUI

This commit is contained in:
mezz committed 2015-10-05 21:59:56 -07:00
1 parent 83b7ce00f7
commit 48ef020dc9
1 file changed
+6 -4
@@ -151,16 +151,18 @@ public final class FluidHelper {
return false;
}
if (!hasRoomForDrainedContainer(input, output, drainedItem, inputSlot, outputSlot)) {
// consume forestry containers if there is only one slot
if (outputSlot == inputSlot && drainedItem != null) {
Item item = drainedItem.getItem();
// consume forestry containers if there is no room for them
if (ForestryItem.canEmpty.isItemEqual(item) || ForestryItem.waxCapsule.isItemEqual(item) || ForestryItem.refractoryEmpty.isItemEqual(item)) {
drainedItem = null;
} else {
return false;
}
}
if (!hasRoomForDrainedContainer(input, output, drainedItem, inputSlot, outputSlot)) {
return false;
}
fluidHandler.fill(ForgeDirection.UNKNOWN, fluidInContainer, true);
if (drainedItem != null) {