MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / main

Method main

src/main/java/net/minecraft/client/main/Main.java:22–112  ·  view source on GitHub ↗
(String[] p_main_0_)

Source from the content-addressed store, hash-verified

20public class Main
21{
22 public static void main(String[] p_main_0_)
23 {
24 System.setProperty("java.net.preferIPv4Stack", "true");
25 OptionParser optionparser = new OptionParser();
26 optionparser.allowsUnrecognizedOptions();
27 optionparser.accepts("fullscreen");
28 optionparser.accepts("checkGlErrors");
29 OptionSpec<String> optionspec = optionparser.accepts("server").withRequiredArg();
30 OptionSpec<Integer> optionspec1 = optionparser.accepts("port").withRequiredArg().ofType(Integer.class).defaultsTo(25565);
31 OptionSpec<File> optionspec2 = optionparser.accepts("gameDir").withRequiredArg().ofType(File.class).defaultsTo(new File("."));
32 OptionSpec<File> optionspec3 = optionparser.accepts("assetsDir").withRequiredArg().ofType(File.class);
33 OptionSpec<File> optionspec4 = optionparser.accepts("resourcePackDir").withRequiredArg().ofType(File.class);
34 OptionSpec<String> optionspec5 = optionparser.accepts("proxyHost").withRequiredArg();
35 OptionSpec<Integer> optionspec6 = optionparser.accepts("proxyPort").withRequiredArg().defaultsTo("8080", new String[0]).ofType(Integer.class);
36 OptionSpec<String> optionspec7 = optionparser.accepts("proxyUser").withRequiredArg();
37 OptionSpec<String> optionspec8 = optionparser.accepts("proxyPass").withRequiredArg();
38 OptionSpec<String> optionspec9 = optionparser.accepts("username").withRequiredArg().defaultsTo("Player" + Minecraft.getSystemTime() % 1000L);
39 OptionSpec<String> optionspec10 = optionparser.accepts("uuid").withRequiredArg();
40 OptionSpec<String> optionspec11 = optionparser.accepts("accessToken").withRequiredArg().required();
41 OptionSpec<String> optionspec12 = optionparser.accepts("version").withRequiredArg().required();
42 OptionSpec<Integer> optionspec13 = optionparser.accepts("width").withRequiredArg().ofType(Integer.class).defaultsTo(854);
43 OptionSpec<Integer> optionspec14 = optionparser.accepts("height").withRequiredArg().ofType(Integer.class).defaultsTo(480);
44 OptionSpec<String> optionspec15 = optionparser.accepts("userProperties").withRequiredArg().defaultsTo("{}");
45 OptionSpec<String> optionspec16 = optionparser.accepts("profileProperties").withRequiredArg().defaultsTo("{}");
46 OptionSpec<String> optionspec17 = optionparser.accepts("assetIndex").withRequiredArg();
47 OptionSpec<String> optionspec18 = optionparser.accepts("userType").withRequiredArg().defaultsTo("legacy");
48 OptionSpec<String> optionspec19 = optionparser.nonOptions();
49 OptionSet optionset = optionparser.parse(p_main_0_);
50 List<String> list = optionset.valuesOf(optionspec19);
51
52 if (!list.isEmpty())
53 {
54 System.out.println("Completely ignored arguments: " + list);
55 }
56
57 String s = optionset.valueOf(optionspec5);
58 Proxy proxy = Proxy.NO_PROXY;
59
60 if (s != null)
61 {
62 try
63 {
64 proxy = new Proxy(Type.SOCKS, new InetSocketAddress(s, optionset.valueOf(optionspec6)));
65 }
66 catch (Exception var46)
67 {
68 ;
69 }
70 }
71
72 final String s1 = optionset.valueOf(optionspec7);
73 final String s2 = optionset.valueOf(optionspec8);
74
75 if (!proxy.equals(Proxy.NO_PROXY) && isNullOrEmpty(s1) && isNullOrEmpty(s2))
76 {
77 Authenticator.setDefault(new Authenticator()
78 {
79 protected PasswordAuthentication getPasswordAuthentication()

Callers 1

mainMethod · 0.95

Calls 10

getSystemTimeMethod · 0.95
isNullOrEmptyMethod · 0.95
printlnMethod · 0.80
parseMethod · 0.65
fromJsonMethod · 0.65
isEmptyMethod · 0.45
equalsMethod · 0.45
createMethod · 0.45
setNameMethod · 0.45
runMethod · 0.45

Tested by

no test coverage detected