frame.setLayout(new BorderLayout());
frame.add(canvas, "Center");
canvas.setPreferredSize(new Dimension(854, 480));
frame.pack();
frame.setLocationRelativeTo(null);
MinecraftImpl minecraftimpl = new MinecraftImpl(frame, canvas, null, 854, 480, flag, frame);
Thread thread = new Thread(minecraftimpl, "Minecraft main thread");
thread.setPriority(10);
minecraftimpl.minecraftUri = "www.minecraft.net";
if (s != null && par1Str != null)
{
minecraftimpl.session = new Session(s, par1Str);
}
else
{
minecraftimpl.session = new Session((new StringBuilder()).append("Player").append(System.currentTimeMillis() % 1000L).toString(), "");
}
if (par2Str != null)
{
String as[] = par2Str.split(":");
minecraftimpl.setServer(as[0], Integer.parseInt(as[1]));
}
frame.setVisible(true);
frame.addWindowListener(new GameWindowListener(minecraftimpl, thread));
thread.start();