aboutsummaryrefslogtreecommitdiff
path: root/src/Java/miscutil/enderio/conduit/gas/GasUtil.java
diff options
context:
space:
mode:
authorDraknyte1 <Draknyte1@hotmail.com>2016-02-29 19:33:00 +1000
committerDraknyte1 <Draknyte1@hotmail.com>2016-02-29 19:33:00 +1000
commit6245b6a3eaf1ce475f6624da97ab3f04dcfd35f8 (patch)
treeb8dab0dae8673f54ed5ff80a5bedfcfe4830cc6b /src/Java/miscutil/enderio/conduit/gas/GasUtil.java
parentbcccdaf05ee909ba98f096d9822113bed8f283cd (diff)
downloadGT5-Unofficial-6245b6a3eaf1ce475f6624da97ab3f04dcfd35f8.tar.gz
GT5-Unofficial-6245b6a3eaf1ce475f6624da97ab3f04dcfd35f8.tar.bz2
GT5-Unofficial-6245b6a3eaf1ce475f6624da97ab3f04dcfd35f8.zip
V0.9.2 Release - Removed dev features and some messy code to push a 0.9.2 snapshop codebase.
Diffstat (limited to 'src/Java/miscutil/enderio/conduit/gas/GasUtil.java')
-rw-r--r--src/Java/miscutil/enderio/conduit/gas/GasUtil.java79
1 files changed, 0 insertions, 79 deletions
diff --git a/src/Java/miscutil/enderio/conduit/gas/GasUtil.java b/src/Java/miscutil/enderio/conduit/gas/GasUtil.java
deleted file mode 100644
index 7b85ee017b..0000000000
--- a/src/Java/miscutil/enderio/conduit/gas/GasUtil.java
+++ /dev/null
@@ -1,79 +0,0 @@
-package miscutil.enderio.conduit.gas;
-
-import mekanism.api.gas.GasStack;
-import mekanism.api.gas.IGasHandler;
-import net.minecraft.tileentity.TileEntity;
-import net.minecraft.world.IBlockAccess;
-import cpw.mods.fml.common.Loader;
-import cpw.mods.fml.common.ModContainer;
-import crazypants.enderio.conduit.IConduitBundle;
-import crazypants.enderio.config.Config;
-import crazypants.util.BlockCoord;
-
-public final class GasUtil
-{
- private static boolean useCheckPerformed = false;
- private static boolean isGasConduitEnabled = false;
-
- public static boolean isGasConduitEnabled()
- {
- if (!useCheckPerformed)
- {
- String configOption = Config.isGasConduitEnabled;
- if (configOption.equalsIgnoreCase("auto"))
- {
- isGasConduitEnabled = Loader.isModLoaded("Mekanism");
- if (isGasConduitEnabled) {
- isGasConduitEnabled = ((ModContainer)Loader.instance().getIndexedModList().get("Mekanism")).getVersion().startsWith("7");
- }
- }
- else if (configOption.equalsIgnoreCase("true"))
- {
- isGasConduitEnabled = true;
- }
- else
- {
- isGasConduitEnabled = false;
- }
- useCheckPerformed = true;
- }
- return isGasConduitEnabled;
- }
-
- public static IGasHandler getExternalGasHandler(IBlockAccess world, BlockCoord bc)
- {
- IGasHandler con = getGasHandler(world, bc);
- return (con != null) && (!(con instanceof IConduitBundle)) ? con : null;
- }
-
- public static IGasHandler getGasHandler(IBlockAccess world, BlockCoord bc)
- {
- return getGasHandler(world, bc.x, bc.y, bc.z);
- }
-
- public static IGasHandler getGasHandler(IBlockAccess world, int x, int y, int z)
- {
- TileEntity te = world.getTileEntity(x, y, z);
- return getGasHandler(te);
- }
-
- public static IGasHandler getGasHandler(TileEntity te)
- {
- if ((te instanceof IGasHandler)) {
- return (IGasHandler)te;
- }
- return null;
- }
-
- public static boolean isGasValid(GasStack gas)
- {
- if (gas != null)
- {
- String name = gas.getGas().getLocalizedName();
- if ((name != null) && (!name.trim().isEmpty())) {
- return true;
- }
- }
- return false;
- }
-}