Java 类net.minecraft.client.main.Main 实例源码

项目:Wurst-MC-1.12    文件:WurstBot.java   
public static void main(String[] args)
{
    System.out.println("Starting Wurst-Bot...");
    enabled = true;
    wurstBot = new WurstBot();
    Main.main(new String[]{"--version", "mcp", "--accessToken", "0",
        "--assetsDir", "assets", "--assetIndex", "1.8", "--userProperties",
        "{}"});
}
项目:EMC    文件:IMinecraft.java   
public static void restart(String lwjgl) throws IOException {
    StringBuilder cmd = new StringBuilder();
    cmd.append("java ");
    cmd.append("-Djava.library.path=\"" + lwjgl + "\" ");
    cmd.append("-cp \"").append(ManagementFactory.getRuntimeMXBean().getClassPath()).append("\" ");
    cmd.append(Main.class.getName()).append(" ");
    for (String arg : launch_data) {
        cmd.append(arg).append(" ");
    }
    Runtime.getRuntime().exec(cmd.toString());
    System.exit(0);
}
项目:TFCPrimitiveTech    文件:Start.java   
public static void main(String[] args) throws Exception
{
    int userIndex = -1;
    int passIndex = -1;
    int sessIndex = -1;
    int versIndex = -1;

    for( int x = 0; x < args.length; x++)
    {
        if (args[x].equals("--username"))      userIndex = x + 1;
        else if (args[x].equals("--password")) passIndex = x + 1;
        else if (args[x].equals("--session"))  sessIndex = x + 1;
        else if (args[x].equals("--version"))  versIndex = x + 1;
    }

    if (userIndex != 0-1 && passIndex != -1 && sessIndex == -1)
    {
        String[] session = getSession(args[userIndex], args[passIndex]);
        if (session != null)
        {
            args[userIndex] = session[0];
            args = concat(args, new String[]{"--session", session[1]});
        }
    }

    //Kill the password if its there so it isn't printed to the console.
    if (passIndex != -1)
    {
        args[passIndex-1] = "no_password_for_joo";
        args[passIndex] = "no_password_for_joo";
    }

    if (versIndex == -1)
    {
        args = concat(args, new String[]{ "--version", "fml_mcp" });
    }

    Main.main(args);
}
项目:ExtraUtilities    文件:Start.java   
public static void main(String[] args) throws Exception
{
    int userIndex = -1;
    int passIndex = -1;
    int sessIndex = -1;
    int versIndex = -1;

    for( int x = 0; x < args.length; x++)
    {
        if (args[x].equals("--username"))      userIndex = x + 1;
        else if (args[x].equals("--password")) passIndex = x + 1;
        else if (args[x].equals("--session"))  sessIndex = x + 1;
        else if (args[x].equals("--version"))  versIndex = x + 1;
    }

    if (userIndex != 0-1 && passIndex != -1 && sessIndex == -1)
    {
        String[] session = getSession(args[userIndex], args[passIndex]);
        if (session != null)
        {
            args[userIndex] = session[0];
            args = concat(args, new String[]{"--session", session[1]});
        }
    }

    //Kill the password if its there so it isn't printed to the console.
    if (passIndex != -1)
    {
        args[passIndex-1] = "no_password_for_joo";
        args[passIndex] = "no_password_for_joo";
    }

    if (versIndex == -1)
    {
        args = concat(args, new String[]{ "--version", "fml_mcp" });
    }

    Main.main(args);
}
项目:TRHS_Club_Mod_2016    文件:Start.java   
public static void main(String[] args) throws Exception
{
    int userIndex = -1;
    int passIndex = -1;
    int sessIndex = -1;
    int versIndex = -1;

    for( int x = 0; x < args.length; x++)
    {
        if (args[x].equals("--username"))      userIndex = x + 1;
        else if (args[x].equals("--password")) passIndex = x + 1;
        else if (args[x].equals("--session"))  sessIndex = x + 1;
        else if (args[x].equals("--version"))  versIndex = x + 1;
    }

    if (userIndex != 0-1 && passIndex != -1 && sessIndex == -1)
    {
        String[] session = getSession(args[userIndex], args[passIndex]);
        if (session != null)
        {
            args[userIndex] = session[0];
            args = concat(args, new String[]{"--session", session[1]});
        }
    }

    //Kill the password if its there so it isn't printed to the console.
    if (passIndex != -1)
    {
        args[passIndex-1] = "no_password_for_joo";
        args[passIndex] = "no_password_for_joo";
    }

    if (versIndex == -1)
    {
        args = concat(args, new String[]{ "--version", "fml_mcp" });
    }

    Main.main(args);
}
项目:EvenWurse    文件:WurstBot.java   
public static void main(String[] args) {
    System.out.println("Starting Wurst-Bot...");
    enabled = true;
    wurstBot = new WurstBot();
    Main.main(new String[]{"--version", "mcp", "--accessToken", "0", "--assetsDir", "assets", "--assetIndex", "1.8",
            "--userProperties", "{}"});
}
项目:CauldronGit    文件:Start.java   
public static void main(String[] args) throws Exception
{
    int userIndex = -1;
    int passIndex = -1;
    int sessIndex = -1;
    int versIndex = -1;

    for( int x = 0; x < args.length; x++)
    {
        if (args[x].equals("--username"))      userIndex = x + 1;
        else if (args[x].equals("--password")) passIndex = x + 1;
        else if (args[x].equals("--session"))  sessIndex = x + 1;
        else if (args[x].equals("--version"))  versIndex = x + 1;
    }

    if (userIndex != 0-1 && passIndex != -1 && sessIndex == -1)
    {
        String[] session = getSession(args[userIndex], args[passIndex]);
        if (session != null)
        {
            args[userIndex] = session[0];
            args = concat(args, new String[]{"--session", session[1]});
        }
    }

    //Kill the password if its there so it isn't printed to the console.
    if (passIndex != -1)
    {
        args[passIndex-1] = "no_password_for_joo";
        args[passIndex] = "no_password_for_joo";
    }

    if (versIndex == -1)
    {
        args = concat(args, new String[]{ "--version", "fml_mcp" });
    }

    Main.main(args);
}
项目:dch_hack1ng_d4ys_workshop    文件:Start.java   
public static void main(String[] args) throws Exception
{
    int userIndex = -1;
    int passIndex = -1;
    int sessIndex = -1;
    int versIndex = -1;

    for( int x = 0; x < args.length; x++)
    {
        if (args[x].equals("--username"))      userIndex = x + 1;
        else if (args[x].equals("--password")) passIndex = x + 1;
        else if (args[x].equals("--session"))  sessIndex = x + 1;
        else if (args[x].equals("--version"))  versIndex = x + 1;
    }

    if (userIndex != 0-1 && passIndex != -1 && sessIndex == -1)
    {
        String[] session = getSession(args[userIndex], args[passIndex]);
        if (session != null)
        {
            args[userIndex] = session[0];
            args = concat(args, new String[]{"--session", session[1]});
        }
    }

    //Kill the password if its there so it isn't printed to the console.
    if (passIndex != -1)
    {
        args[passIndex-1] = "no_password_for_joo";
        args[passIndex] = "no_password_for_joo";
    }

    if (versIndex == -1)
    {
        args = concat(args, new String[]{ "--version", "fml_mcp" });
    }

    Main.main(args);
}
项目:Cauldron    文件:Start.java   
public static void main(String[] args) throws Exception
{
    int userIndex = -1;
    int passIndex = -1;
    int sessIndex = -1;
    int versIndex = -1;

    for( int x = 0; x < args.length; x++)
    {
        if (args[x].equals("--username"))      userIndex = x + 1;
        else if (args[x].equals("--password")) passIndex = x + 1;
        else if (args[x].equals("--session"))  sessIndex = x + 1;
        else if (args[x].equals("--version"))  versIndex = x + 1;
    }

    if (userIndex != 0-1 && passIndex != -1 && sessIndex == -1)
    {
        String[] session = getSession(args[userIndex], args[passIndex]);
        if (session != null)
        {
            args[userIndex] = session[0];
            args = concat(args, new String[]{"--session", session[1]});
        }
    }

    //Kill the password if its there so it isn't printed to the console.
    if (passIndex != -1)
    {
        args[passIndex-1] = "no_password_for_joo";
        args[passIndex] = "no_password_for_joo";
    }

    if (versIndex == -1)
    {
        args = concat(args, new String[]{ "--version", "fml_mcp" });
    }

    Main.main(args);
}
项目:Cauldron    文件:Start.java   
public static void main(String[] args) throws Exception
{
    int userIndex = -1;
    int passIndex = -1;
    int sessIndex = -1;
    int versIndex = -1;

    for( int x = 0; x < args.length; x++)
    {
        if (args[x].equals("--username"))      userIndex = x + 1;
        else if (args[x].equals("--password")) passIndex = x + 1;
        else if (args[x].equals("--session"))  sessIndex = x + 1;
        else if (args[x].equals("--version"))  versIndex = x + 1;
    }

    if (userIndex != 0-1 && passIndex != -1 && sessIndex == -1)
    {
        String[] session = getSession(args[userIndex], args[passIndex]);
        if (session != null)
        {
            args[userIndex] = session[0];
            args = concat(args, new String[]{"--session", session[1]});
        }
    }

    //Kill the password if its there so it isn't printed to the console.
    if (passIndex != -1)
    {
        args[passIndex-1] = "no_password_for_joo";
        args[passIndex] = "no_password_for_joo";
    }

    if (versIndex == -1)
    {
        args = concat(args, new String[]{ "--version", "fml_mcp" });
    }

    Main.main(args);
}
项目:Cauldron    文件:Start.java   
public static void main(String[] args) throws Exception
{
    int userIndex = -1;
    int passIndex = -1;
    int sessIndex = -1;
    int versIndex = -1;

    for( int x = 0; x < args.length; x++)
    {
        if (args[x].equals("--username"))      userIndex = x + 1;
        else if (args[x].equals("--password")) passIndex = x + 1;
        else if (args[x].equals("--session"))  sessIndex = x + 1;
        else if (args[x].equals("--version"))  versIndex = x + 1;
    }

    if (userIndex != 0-1 && passIndex != -1 && sessIndex == -1)
    {
        String[] session = getSession(args[userIndex], args[passIndex]);
        if (session != null)
        {
            args[userIndex] = session[0];
            args = concat(args, new String[]{"--session", session[1]});
        }
    }

    //Kill the password if its there so it isn't printed to the console.
    if (passIndex != -1)
    {
        args[passIndex-1] = "no_password_for_joo";
        args[passIndex] = "no_password_for_joo";
    }

    if (versIndex == -1)
    {
        args = concat(args, new String[]{ "--version", "fml_mcp" });
    }

    Main.main(args);
}
项目:N-API    文件:DevLaunch.java   
public static void main(String[] args)
{
    if (checkJavaVersion())
    {
        Main.main(prepArgs(args));
    }
    else
    {
        NAPILogHelper.instance.logCritical("JAVA VERSION IS NOT " + REQ_JAVA_VERSION_STRING + "! N-API WILL NOT RUN! If you wish to run N-API, use Java " + REQ_JAVA_VERSION_STRING + ".");
    }
}
项目:RuneCraftery    文件:Start.java   
public static void main(String[] args) throws Exception
{
    int userIndex = -1;
    int passIndex = -1;
    int sessIndex = -1;
    int versIndex = -1;

    for( int x = 0; x < args.length; x++)
    {
        if (args[x].equals("--username"))      userIndex = x + 1;
        else if (args[x].equals("--password")) passIndex = x + 1;
        else if (args[x].equals("--session"))  sessIndex = x + 1;
        else if (args[x].equals("--version"))  versIndex = x + 1;
    }

    if (userIndex != 0-1 && passIndex != -1 && sessIndex == -1)
    {
        String[] session = getSession(args[userIndex], args[passIndex]);
        if (session != null)
        {
            args[userIndex] = session[0];
            args = concat(args, new String[]{"--session", session[1]});
        }
    }

    //Kill the password if its there so it isn't printed to the console.
    if (passIndex != -1)
    {
        args[passIndex-1] = "no_password_for_joo";
        args[passIndex] = "no_password_for_joo";
    }

    if (versIndex == -1)
    {
        args = concat(args, new String[]{ "--version", "fml_mcp" });
    }

    Main.main(args);
}
项目:RuneCraftery    文件:Start.java   
public static void main(String[] args) throws Exception
{
    int userIndex = -1;
    int passIndex = -1;
    int sessIndex = -1;
    int versIndex = -1;

    for( int x = 0; x < args.length; x++)
    {
        if (args[x].equals("--username"))      userIndex = x + 1;
        else if (args[x].equals("--password")) passIndex = x + 1;
        else if (args[x].equals("--session"))  sessIndex = x + 1;
        else if (args[x].equals("--version"))  versIndex = x + 1;
    }

    if (userIndex != 0-1 && passIndex != -1 && sessIndex == -1)
    {
        String[] session = getSession(args[userIndex], args[passIndex]);
        if (session != null)
        {
            args[userIndex] = session[0];
            args = concat(args, new String[]{"--session", session[1]});
        }
    }

    //Kill the password if its there so it isn't printed to the console.
    if (passIndex != -1)
    {
        args[passIndex-1] = "no_password_for_joo";
        args[passIndex] = "no_password_for_joo";
    }

    if (versIndex == -1)
    {
        args = concat(args, new String[]{ "--version", "fml_mcp" });
    }

    Main.main(args);
}
项目:BaseClient    文件:Start.java   
public static void main(String[] args)
{
    Main.main(concat(new String[] {"--version", "mcp", "--accessToken", "0", "--assetsDir", "assets", "--assetIndex", "1.8", "--userProperties", "{}"}, args));
}
项目:BaseClient    文件:Start.java   
public static void main(String[] args)
{
    Main.main(concat(new String[] {"--version", "mcp", "--accessToken", "0", "--assetsDir", "assets", "--assetIndex", "1.8", "--userProperties", "{}"}, args));
}
项目:EMC    文件:IMinecraft.java   
public static File getMinecraftFile() throws URISyntaxException {
    return new File(Main.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath());
}
项目:Backmemed    文件:Start.java   
public static void main(String[] args)
{
    Main.main(concat(new String[] {"--version", "mcp", "--accessToken", "0", "--assetsDir", "assets", "--assetIndex", "1.8", "--userProperties", "{}"}, args));
}
项目:OpenModLoader    文件:OMLTweaker.java   
@Override
public String getLaunchTarget() {
    return Main.class.getCanonicalName();
}
项目:Resilience-Client-Source    文件:Start.java   
public static void main(String[] args)
{
    Main.main(concat(new String[] {"--version", "mcp", "--accessToken", "0", "--assetsDir", "assets/virtual/legacy"}, args));
}
项目:RuneCraftery    文件:Start.java   
public static void main(String[] args) throws Exception
{
    int userIndex = -1;
    int passIndex = -1;
    int sessIndex = -1;
    int versIndex = -1;

    for (int x = 0; x < args.length; x++)
    {
        if (args[x].equals("--username"))
        {
            userIndex = x + 1;
        }
        else if (args[x].equals("--password"))
        {
            passIndex = x + 1;
        }
        else if (args[x].equals("--session"))
        {
            sessIndex = x + 1;
        }
        else if (args[x].equals("--version"))
        {
            versIndex = x + 1;
        }
    }

    if (userIndex != 0 - 1 && passIndex != -1 && sessIndex == -1)
    {
        String[] session = getSession(args[userIndex], args[passIndex]);

        if (session != null)
        {
            args[userIndex] = session[0];
            args = concat(args, new String[] {"--session", session[1]});
        }
    }

    if (passIndex != -1)
    {
        args[passIndex - 1] = "no_password_for_joo";
        args[passIndex] = "no_password_for_joo";
    }

    if (versIndex == -1)
    {
        args = concat(args, new String[] { "--version", "fml_mcp" });
    }

    Main.main(args);
}
项目:Leapcraft    文件:LeapInjector.java   
public static void main(String[] args) throws Exception {
    boolean windows = System.getProperty("os.name").toLowerCase().startsWith("win");
    boolean forge = checkForForge();

    String arch = System.getProperty("sun.arch.data.model");
    String nativeDir = System.getProperty("java.library.path") + File.separator;

    System.out.println("## Leap: Injecting LeapManager...");
    LeapManager.instance = new LeapManager();

    if (LeapManager.instance.reflect()) {
        System.out.println("## Leap: Injection successful, " + (windows ? "copying native libraries" : "starting Minecraft") + "...");

        if (windows) {
            FileUtils.copyFile(new File(nativeDir + "Leap" + arch + ".dll"), new File(nativeDir + "Leap.dll"));
            FileUtils.copyFile(new File(nativeDir + "LeapJava" + arch + ".dll"), new File(nativeDir + "LeapJava.dll"));
            System.out.println("## Leap: Native libraries copied, starting Minecraft...");
        }

        LeapManager.instance.start();
    } else {
        System.out.println("!! Leap: Starting Minecraft without Leap support!");
    }

    if (forge) {
        System.out.println("## Leap: Forge detected. Passing control to Forge instead of vanilla.");

        int tweakIndex = -1;

        for (int i = 0; i < args.length; i++) {
            if (args[i].equals("--tweakClass")) {
                tweakIndex = i;
                args[tweakIndex + 1] = "cpw.mods.fml.common.launcher.FMLTweaker";
            }
        }

        if (tweakIndex == -1) {
            // Now we have to copy the array, grumble grumble grumble
            String[] oldArgs = args;
            args = new String[args.length + 2];
            System.arraycopy(oldArgs, 0, args, 0, oldArgs.length);
            args[oldArgs.length] = "--tweakClass";
            args[oldArgs.length + 1] = "cpw.mods.fml.common.launcher.FMLTweaker";
        }

        Method m = Class.forName("net.minecraft.launchwrapper.Launch").getDeclaredMethod("main", String[].class);
        m.invoke(null, (String[]) args);
    } else {
        Main.main(args);
    }

    System.out.println("## Leap: Shutting down and cleaning up!");
    LeapManager.instance.stop();
}
项目:BetterNutritionMod    文件:Start.java   
public static void main(String[] args) throws Exception
{
    int userIndex = -1;
    int passIndex = -1;
    int sessIndex = -1;
    int versIndex = -1;

    for (int x = 0; x < args.length; x++)
    {
        if (args[x].equals("--username"))
        {
            userIndex = x + 1;
        }
        else if (args[x].equals("--password"))
        {
            passIndex = x + 1;
        }
        else if (args[x].equals("--session"))
        {
            sessIndex = x + 1;
        }
        else if (args[x].equals("--version"))
        {
            versIndex = x + 1;
        }
    }

    if (userIndex != 0 - 1 && passIndex != -1 && sessIndex == -1)
    {
        String[] session = getSession(args[userIndex], args[passIndex]);

        if (session != null)
        {
            args[userIndex] = session[0];
            args = concat(args, new String[] {"--session", session[1]});
        }
    }

    if (passIndex != -1)
    {
        args[passIndex - 1] = "no_password_for_joo";
        args[passIndex] = "no_password_for_joo";
    }

    if (versIndex == -1)
    {
        args = concat(args, new String[] { "--version", "fml_mcp" });
    }

    Main.main(args);
}