Added support for non-standard capacity liquid container filling.

This commit is contained in:
CovertJaguar 2012-07-14 06:11:40 -07:00
parent 69412830a7
commit 5e5c3dba08

View file

@ -110,13 +110,14 @@ public class BlockTank extends BlockContainer implements ITextureProvider {
int qty = tank.empty(BuildCraftAPI.BUCKET_VOLUME, false);
if(filled != null && qty >= BuildCraftAPI.BUCKET_VOLUME){
LiquidStack liquid = LiquidManager.getLiquidForFilledItem(filled);
if(liquid != null && qty >= liquid.amount){
if(current.stackSize > 1 && !entityplayer.inventory.addItemStackToInventory(filled)){
return false;
}
entityplayer.inventory.setInventorySlotContents(entityplayer.inventory.currentItem,
Utils.consumeItem(current));
tank.empty(BuildCraftAPI.BUCKET_VOLUME, true);
tank.empty(liquid.amount, true);
return true;
}
}