Fix #426 Throttle the speed of the Generator accepting liquid containers

This commit is contained in:
mezz committed 2015-01-01 23:01:05 -08:00
1 parent f862485a05
commit d436657556
2 files changed
+8 -7

No files matched your search

@@ -120,12 +120,13 @@ public class MachineGenerator extends TileBase implements ISidedInventory, ILiqu
@Override
public void updateServerSide() {
// Check inventory slots for fuel
// Check if we have suitable items waiting in the item slot
IInventoryAdapter inventory = getInternalInventory();
if (inventory.getStackInSlot(SLOT_CAN) != null)
FluidHelper.drainContainers(tankManager, inventory, SLOT_CAN);
if (worldObj.getTotalWorldTime() % 20 == 0) {
// Check inventory slots for fuel
// Check if we have suitable items waiting in the item slot
IInventoryAdapter inventory = getInternalInventory();
if (inventory.getStackInSlot(SLOT_CAN) != null)
FluidHelper.drainContainers(tankManager, inventory, SLOT_CAN);
}
// No work to be done if IC2 is unavailable.
if (ic2EnergySource == null) {
@@ -226,7 +226,7 @@ public class MachineBottler extends TilePowered implements ISidedInventory, ILiq
@Override
public void updateServerSide() {
if (worldObj.getTotalWorldTime() % 20 * 10 != 0)
if (worldObj.getTotalWorldTime() % 20 != 0)
return;
IInventoryAdapter inventory = getInternalInventory();