Fix cells not working with thermal expansion tanks, closes #1504
This commit is contained in:
parent
e87f5fa27e
commit
883a0d0b8b
1 changed files with 8 additions and 0 deletions
|
@ -210,6 +210,10 @@ public class DynamicCell extends Item {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int fill(FluidStack resource, boolean doFill) {
|
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)
|
if (resource.amount != capacity)
|
||||||
return 0;
|
return 0;
|
||||||
return super.fill(resource, doFill);
|
return super.fill(resource, doFill);
|
||||||
|
@ -217,6 +221,10 @@ public class DynamicCell extends Item {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FluidStack drain(int maxDrain, boolean doDrain) {
|
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)
|
if (maxDrain != capacity)
|
||||||
return null;
|
return null;
|
||||||
return super.drain(maxDrain, doDrain);
|
return super.drain(maxDrain, doDrain);
|
||||||
|
|
Loading…
Reference in a new issue