docs: static IBlockState applyVariant(IBlockState state, Variation variant)
      {
          // Try the variant property first - if that fails, look for other properties that match the supplied variant.
          boolean relaxRequirements = false;
          for (int i = 0; i < 2; i++)
          {
              for (IProperty prop : state.getProperties().keySet())
              {
                  if ((prop.getName().equals("variant") || relaxRequirements) && prop.getValueClass().isEnum())
                  {
                      Object[] values = prop.getValueClass().getEnumConstants();
                      for (Object obj : values)
                      {
                          if (obj != null && obj.toString().equalsIgnoreCase(variant.getValue()))
                          {
                              return state.withProperty(prop, (Comparable) obj);
                          }
                      }
                  }
              }
              relaxRequirements = true;   // Failed to set the variant, so try again with other properties.
          }
          return state;
      }