Fix cells not working with thermal expansion tanks, closes #1504

This commit is contained in:
modmuss50 2018-04-30 14:43:09 +01:00
parent e87f5fa27e
commit 883a0d0b8b

View file

@ -210,6 +210,10 @@ public class DynamicCell extends Item {
@Override
public int fill(FluidStack resource, boolean doFill) {
//Done to allow mods that try to move max int of fluid, allows the cells to work with thermal tanks.
if(resource.amount > capacity){
resource.amount = capacity;
}
if (resource.amount != capacity)
return 0;
return super.fill(resource, doFill);
@ -217,6 +221,10 @@ public class DynamicCell extends Item {
@Override
public FluidStack drain(int maxDrain, boolean doDrain) {
//Done to allow mods that try to move max int of fluid, allows the cells to work with thermal tanks.
if(maxDrain > capacity){
maxDrain = capacity;
}
if (maxDrain != capacity)
return null;
return super.drain(maxDrain, doDrain);