public static void jWaitCraft(String wnd, int timeout) {
        int cur = 0;
        while (true) {
            if (cur > timeout)
                break;
            if (UI.instance.make_window != null)
                if ((UI.instance.make_window.is_ready) &&
                        (UI.instance.make_window.craft_name.equals(wnd))) return;
            if (!JSBot.Sleep(25)) return;
            cur += 25;
        }
    }