fix charging table storing negative RF

This commit is contained in:
asiekierka 2015-03-06 20:27:01 +01:00
parent 31742b3c96
commit c82fa36033

View file

@ -7,7 +7,7 @@ import cpw.mods.fml.common.FMLCommonHandler;
import cofh.api.energy.IEnergyContainerItem;
import buildcraft.api.tiles.IHasWork;
import buildcraft.core.utils.StringUtils;
import buildcraft.core.lib.utils.StringUtils;
public class TileChargingTable extends TileLaserTableBase implements IHasWork {
@Override
@ -27,7 +27,7 @@ public class TileChargingTable extends TileLaserTableBase implements IHasWork {
addEnergy(0 - containerItem.receiveEnergy(stack, getEnergy(), false));
this.setInventorySlotContents(0, stack);
} else {
addEnergy(-10);
subtractEnergy(Math.min(getEnergy(), 10));
}
}
}