-
Notifications
You must be signed in to change notification settings - Fork 4
/
ClientStart.java
35 lines (32 loc) · 1006 Bytes
/
ClientStart.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
import net.minecraft.client.Minecraft;
import net.minecraft.launchwrapper.Launch;
/**
*
* Run this in case that Minecraft is another project
*
* @author XOR
*
*/
public class ClientStart {
/**
*
* Start the client
*
* @param args only allowed --username yourName
*/
public static void main(String args[]){
System.setProperty("fml.ignoreInvalidMinecraftCertificates", "true");
String userName = System.getProperty("user.name", "PowerCraftPlayer"+(Minecraft.getSystemTime()%1000));
String assetsDir="";
if(args!=null){
for(int i=0; i<args.length-1; i++){
if(args[i].equals("--username")){
userName = args[++i];
}else if(args[i].equals("--assetsDir")){
assetsDir = args[++i];
}
}
}
Launch.main(new String[]{"--version", "1.6", "--tweakClass", "cpw.mods.fml.common.launcher.FMLTweaker", "--userProperties", "{}", "--accessToken", "0", "--username", userName, assetsDir!=""?"--assetsDir":"", assetsDir});
}
}