当前位置: 首页>>代码示例>>Java>>正文


Java Launch.main方法代码示例

本文整理汇总了Java中net.minecraft.launchwrapper.Launch.main方法的典型用法代码示例。如果您正苦于以下问题:Java Launch.main方法的具体用法?Java Launch.main怎么用?Java Launch.main使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.minecraft.launchwrapper.Launch的用法示例。


在下文中一共展示了Launch.main方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: main

import net.minecraft.launchwrapper.Launch; //导入方法依赖的package包/类
public static void main(String... args) throws Exception {
    List<String> launchWrapperArgs = new ArrayList<>();
    launchWrapperArgs.add("--tweakClass");
    launchWrapperArgs.add(MixinBootstrapTweaker.class.getName());
    launchWrapperArgs.addAll(Arrays.asList(args));
    Launch.main(launchWrapperArgs.toArray(new String[launchWrapperArgs.size()]));
}
 
开发者ID:PizzaCrust,项目名称:Mixinite,代码行数:8,代码来源:MixiniteLaunchWrapperLaunch.java

示例2: load

import net.minecraft.launchwrapper.Launch; //导入方法依赖的package包/类
private static void load(String[] args) {
    removeFromSysArgs();
    String[] newArgs = new String[args.length + 6];
    System.arraycopy(args, 0, newArgs, 6, args.length);
    newArgs[0] = "--tweakClass";
    newArgs[1] = PRE_TWEAKER;
    newArgs[2] = "--tweakClass";
    newArgs[3] = FML_TWEAKER;
    newArgs[4] = "--tweakClass";
    newArgs[5] = POST_TWEAKER;
    Launch.main(newArgs);
}
 
开发者ID:simon816,项目名称:SpongeBootstrap,代码行数:13,代码来源:Bootstrap.java

示例3: main

import net.minecraft.launchwrapper.Launch; //导入方法依赖的package包/类
public static void main(String[] args) {
    File file = new File(".gradle/minecraft/natives/");
    if (!file.exists()) {
        file = new File("../.gradle/minecraft/natives/");
    }
    System.setProperty("org.lwjgl.librarypath", file.getAbsolutePath());
    OMLStrippableTransformer.SIDE = Side.CLIENT;
    LaunchArguments arguments = new LaunchArguments(args);

    if (arguments.containsArgument("password")) {
        YggdrasilUserAuthentication auth = (YggdrasilUserAuthentication) (new YggdrasilAuthenticationService(Proxy.NO_PROXY, "1")).createUserAuthentication(Agent.MINECRAFT);
        auth.setUsername(arguments.getArgument("username"));
        auth.setPassword(arguments.getArgument("password"));
        arguments.removeArgument("password");

        try {
            auth.logIn();
        } catch (AuthenticationException e) {
            e.printStackTrace();
            return;
        }

        arguments.addArgument("accessToken", auth.getAuthenticatedToken());
        arguments.addArgument("uuid", auth.getSelectedProfile().getId().toString().replace("-", ""));
        arguments.addArgument("username", auth.getSelectedProfile().getName());
        arguments.addArgument("userType", auth.getUserType().getName());
        arguments.addArgument("userProperties", new GsonBuilder().registerTypeAdapter(PropertyMap.class, new PropertyMap.Serializer()).create().toJson(auth.getUserProperties()));
    }

    arguments.addArgument("version", "1.10.2");
    arguments.addArgument("assetIndex", "1.10");
    arguments.addArgument("tweakClass", "xyz.openmodloader.launcher.OMLTweaker");

    if (arguments.containsArgument("accessToken")) {
        arguments.addArgument("accessToken", "OpenModLoader");
    }

    Launch.main(arguments.getArguments());
}
 
开发者ID:OpenModLoader,项目名称:OpenModLoader,代码行数:40,代码来源:OpenModLoaderClient.java

示例4: main

import net.minecraft.launchwrapper.Launch; //导入方法依赖的package包/类
public static void main(String[] args) {
    OMLStrippableTransformer.SIDE = Side.SERVER;
    LaunchArguments arguments = new LaunchArguments(args);

    arguments.addArgument("version", "1.10.2");
    arguments.addArgument("assetIndex", "1.10");
    arguments.addArgument("accessToken", "OpenModLoader");
    arguments.addArgument("tweakClass", "xyz.openmodloader.launcher.OMLServerTweaker");

    Launch.main(arguments.getArguments());
}
 
开发者ID:OpenModLoader,项目名称:OpenModLoader,代码行数:12,代码来源:OpenModLoaderServer.java

示例5: main

import net.minecraft.launchwrapper.Launch; //导入方法依赖的package包/类
public static void main(String[] args) {

		List<String> argList = new ArrayList<>();
		for (String arg : args) {
			argList.add(arg);
		}
		argList.add("--tweakClass");
		argList.add("net.fabricmc.base.launch.FabricServerTweaker");

		Object[] objectList = argList.toArray();
		String[] stringArray = Arrays.copyOf(objectList, objectList.length, String[].class);
		Launch.main(stringArray);
	}
 
开发者ID:FabricMC,项目名称:fabric-base,代码行数:14,代码来源:FabricServerLauncher.java

示例6: main

import net.minecraft.launchwrapper.Launch; //导入方法依赖的package包/类
public static void main(final String[] args) throws Exception {
    // Get the location of our jar
    Path base = Paths.get(NeptuneServerMain.class.getProtectionDomain().getCodeSource().getLocation().toURI()).getParent();

    // Establish whether the Minecraft server jar has already been obtained.
    if (!checkMinecraft(base)) {
        return;
    }

    // Invoke LaunchWrapper
    Launch.main(join(args,
            "--tweakClass", "org.neptunepowered.vanilla.launch.NeptuneServerTweaker"
    ));
}
 
开发者ID:NeptunePowered,项目名称:NeptuneMod,代码行数:15,代码来源:NeptuneServerMain.java

示例7: main

import net.minecraft.launchwrapper.Launch; //导入方法依赖的package包/类
public static void main(String[] args) throws Exception {
    if(!checkMinecraft()){
        return;
    }

    Launch.main(join(args,
            "--tweakClass", "jk_5.nailed.launch.ServerTweaker"
    ));
}
 
开发者ID:nailed,项目名称:nailed,代码行数:10,代码来源:ServerMain.java


注:本文中的net.minecraft.launchwrapper.Launch.main方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。