2012-11-23 03:22:11 +01:00
|
|
|
package mekanism.api;
|
|
|
|
|
2013-05-14 17:34:26 +02:00
|
|
|
import net.minecraft.util.Icon;
|
2013-04-23 02:14:00 +02:00
|
|
|
|
2012-11-23 03:22:11 +01:00
|
|
|
/**
|
2013-04-01 01:12:10 +02:00
|
|
|
* The gasses currently available in Mekanism.
|
2012-11-23 03:22:11 +01:00
|
|
|
* @author AidanBrady
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
public enum EnumGas
|
|
|
|
{
|
2013-04-23 02:14:00 +02:00
|
|
|
NONE("None", null, null),
|
|
|
|
OXYGEN("Oxygen", null, null),
|
|
|
|
HYDROGEN("Hydrogen", null, null);
|
2012-11-23 03:22:11 +01:00
|
|
|
|
|
|
|
public String name;
|
2013-05-14 17:34:26 +02:00
|
|
|
public Icon gasIcon;
|
2013-04-23 02:14:00 +02:00
|
|
|
public String texturePath;
|
2012-11-23 03:22:11 +01:00
|
|
|
|
|
|
|
public static EnumGas getFromName(String gasName)
|
|
|
|
{
|
|
|
|
for(EnumGas gas : values())
|
|
|
|
{
|
|
|
|
if(gasName.contains(gas.name))
|
|
|
|
{
|
|
|
|
return gas;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
System.out.println("[Mekanism] Invalid gas identifier when retrieving with name.");
|
|
|
|
return NONE;
|
|
|
|
}
|
|
|
|
|
2013-04-23 02:14:00 +02:00
|
|
|
public boolean hasTexture()
|
|
|
|
{
|
2013-05-14 17:34:26 +02:00
|
|
|
return gasIcon != null && texturePath != null;
|
2013-04-23 02:14:00 +02:00
|
|
|
}
|
|
|
|
|
2013-05-14 17:34:26 +02:00
|
|
|
private EnumGas(String s, Icon icon, String path)
|
2012-11-23 03:22:11 +01:00
|
|
|
{
|
|
|
|
name = s;
|
2013-05-14 17:34:26 +02:00
|
|
|
gasIcon = icon;
|
2013-04-23 02:14:00 +02:00
|
|
|
texturePath = path;
|
2012-11-23 03:22:11 +01:00
|
|
|
}
|
|
|
|
}
|