diff options
Diffstat (limited to 'src/Java/miscutil/enderio/conduit/gas/AbstractGasTankConduitNetwork.java')
-rw-r--r-- | src/Java/miscutil/enderio/conduit/gas/AbstractGasTankConduitNetwork.java | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/src/Java/miscutil/enderio/conduit/gas/AbstractGasTankConduitNetwork.java b/src/Java/miscutil/enderio/conduit/gas/AbstractGasTankConduitNetwork.java deleted file mode 100644 index ec75d1319e..0000000000 --- a/src/Java/miscutil/enderio/conduit/gas/AbstractGasTankConduitNetwork.java +++ /dev/null @@ -1,73 +0,0 @@ -package miscutil.enderio.conduit.gas; - -import mekanism.api.gas.GasStack; -import crazypants.enderio.conduit.AbstractConduitNetwork; - -public class AbstractGasTankConduitNetwork<T extends AbstractGasTankConduit> - extends AbstractConduitNetwork<IGasConduit, T> -{ - protected GasStack gasType; - - protected AbstractGasTankConduitNetwork(Class<T> cl) - { - super(cl); - } - - public GasStack getGasType() - { - return this.gasType; - } - - public Class<IGasConduit> getBaseConduitType() - { - return IGasConduit.class; - } - - public void addConduit(T con) - { - super.addConduit(con); - con.setGasType(this.gasType); - } - - public boolean setGasType(GasStack newType) - { - if ((this.gasType != null) && (this.gasType.isGasEqual(newType))) { - return false; - } - if (newType != null) - { - this.gasType = newType.copy(); - this.gasType.amount = 0; - } - else - { - this.gasType = null; - } - for (AbstractGasTankConduit conduit : this.conduits) { - conduit.setGasType(this.gasType); - } - return true; - } - - public boolean canAcceptGas(GasStack acceptable) - { - return areGassCompatable(this.gasType, acceptable); - } - - public static boolean areGassCompatable(GasStack a, GasStack b) - { - if ((a == null) || (b == null)) { - return true; - } - return a.isGasEqual(b); - } - - public int getTotalVolume() - { - int totalVolume = 0; - for (T con : this.conduits) { - totalVolume += con.getTank().getStored(); - } - return totalVolume; - } -} |