Exemplo n.º 1
0
 /**
  * Returns one of DiamondLeggings-type based on name (selected by diorite team). If block contains
  * only one type, sub-name of it will be this same as name of material.<br>
  * Returns null if name can't be parsed to int and it isn't "NEW" one.
  *
  * @param name name of sub-type
  * @return sub-type of DiamondLeggings.
  */
 public static DiamondLeggingsMat getByEnumName(final String name) {
   final DiamondLeggingsMat mat = byName.get(name);
   if (mat == null) {
     final Integer idType = DioriteMathUtils.asInt(name);
     if (idType == null) {
       return null;
     }
     return getByID(idType);
   }
   return mat;
 }