docs: public static Variation attemptToGetAsVariant(String part, ItemStack is)
      {
          if (is.getItem() instanceof ItemBlock)
          {
              // Unlocalised name doesn't always match the names we use in types.xsd
              // (which are the names displayed by Minecraft when using the F3 debug etc.)
              ItemBlock ib = (ItemBlock)(is.getItem());
              IBlockState bs = ib.block.getStateFromMeta(is.getMetadata());
              for (IProperty prop : bs.getProperties().keySet())
              { 
                  Comparable<?> comp = bs.getValue(prop);
                  Variation var = attemptToGetAsVariant(comp.toString());
                  if (var != null)
                      return var;
              }
              return null;
          }
          else
              return attemptToGetAsVariant(part);
      }