capacity was not respected

Updated to properly calculate the amount of free space in the tank
before checking that against the amount of the resource.
This commit is contained in:
Michael Hahn 2013-08-26 12:21:31 -05:00
parent b2c1eae652
commit cc96840aa8
1 changed files with 1 additions and 1 deletions

View File

@ -106,7 +106,7 @@ public class ItemFluidContainer extends Item implements IFluidContainerItem
return 0;
}
int filled = capacity - resource.amount;
int filled = capacity - stack.amount;
if (resource.amount < filled)
{
stack.amount += resource.amount;