diff options
Diffstat (limited to 'src/main/java/gregtech/common/covers/GT_Cover_Pump.java')
-rw-r--r-- | src/main/java/gregtech/common/covers/GT_Cover_Pump.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java index a6f7d653b9..ce7a7a789e 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Pump.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Pump.java @@ -40,7 +40,7 @@ public class GT_Cover_Pump if (tLiquid != null) { tLiquid = tLiquid.copy(); tLiquid.amount = tTank2.fill(ForgeDirection.getOrientation(aSide).getOpposite(), tLiquid, false); - if (tLiquid.amount > 0) { + if (tLiquid.amount > 0 && canTransferFluid(tLiquid)) { if (((aCoverVariable % 2 == 0) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= Math.min(1, tLiquid.amount / 10))) { if (aTileEntity.isUniversalEnergyStored(Math.min(1, tLiquid.amount / 10))) { aTileEntity.decreaseStoredEnergyUnits(Math.min(1, tLiquid.amount / 10), true); @@ -56,7 +56,7 @@ public class GT_Cover_Pump if (tLiquid != null) { tLiquid = tLiquid.copy(); tLiquid.amount = tTank1.fill(ForgeDirection.getOrientation(aSide), tLiquid, false); - if (tLiquid.amount > 0) { + if (tLiquid.amount > 0 && canTransferFluid(tLiquid)) { if (((aCoverVariable % 2 == 0) || (aSide != 1)) && ((aCoverVariable % 2 != 0) || (aSide != 0)) && (aTileEntity.getUniversalEnergyCapacity() >= Math.min(1, tLiquid.amount / 10))) { if (aTileEntity.isUniversalEnergyStored(Math.min(1, tLiquid.amount / 10))) { aTileEntity.decreaseStoredEnergyUnits(Math.min(1, tLiquid.amount / 10), true); @@ -73,6 +73,10 @@ public class GT_Cover_Pump return aCoverVariable; } + protected boolean canTransferFluid(FluidStack fluid) { + return true; + } + public int onCoverScrewdriverclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { aCoverVariable = (aCoverVariable + (aPlayer.isSneaking()? -1 : 1)) % 12; if(aCoverVariable <0){aCoverVariable = 11;} |