mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-20 20:12:30 +00:00
39 lines
488 B
Java
39 lines
488 B
Java
package mekanism.common;
|
|
|
|
public enum Resource
|
|
{
|
|
IRON("Iron"),
|
|
GOLD("Gold"),
|
|
OSMIUM("Osmium"),
|
|
COPPER("Copper"),
|
|
TIN("Tin"),
|
|
SILVER("Silver"),
|
|
OBSIDIAN("Obsidian"),
|
|
LEAD("Lead");
|
|
|
|
private String name;
|
|
|
|
private Resource(String s)
|
|
{
|
|
name = s;
|
|
}
|
|
|
|
public static Resource getFromName(String s)
|
|
{
|
|
for(Resource r : values())
|
|
{
|
|
if(r.name.toLowerCase().equals(s.toLowerCase()))
|
|
{
|
|
return r;
|
|
}
|
|
}
|
|
|
|
return null;
|
|
}
|
|
|
|
public String getName()
|
|
{
|
|
return name;
|
|
}
|
|
}
|