mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 12:59:41 +00:00
prevent turbine from saying it filled more than it was even given
This commit is contained in:
1 parent
e0ef0f7636
commit
355dd71d9e
1 file changed
+2
-2
@@ -369,7 +369,7 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I
|
||||
@Override
|
||||
public int fill(EnumFacing from, FluidStack resource, boolean doFill)
|
||||
{
|
||||
if(!canFill(from, resource != null ? resource.getFluid() : null))
|
||||
if(resource == null || !canFill(from, resource != null ? resource.getFluid() : null))
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
@@ -383,7 +383,7 @@ public class TileEntityTurbineValve extends TileEntityTurbineCasing implements I
|
||||
|
||||
if(filled < structure.getFluidCapacity() && structure.dumpMode != GasMode.IDLE)
|
||||
{
|
||||
filled = structure.getFluidCapacity();
|
||||
filled = Math.min(structure.getFluidCapacity(), resource.amount);
|
||||
}
|
||||
|
||||
return filled;
|
||||
|
||||
Reference in new issue
Block a user