0

我正在尝试使用 MCP62 修改我的我的世界,但是当我尝试重新编译它时,我收到了一些错误消息。我回去修好了,除了一个,我被这个难住了。它说尝试创建一个新的 AWTGLCanvas 会创建一个未报告的异常

这是编译器错误消息:

src/minecraft/net/minecraft/client/Minecraft.java:2461: unreported exception org.lwjgl.LWJGLException; must be caught or declared to be thrown
    AWTGLCanvas awtglcanvas = new AWTGLCanvas();

这是它发生的代码:

public static void startMainThread(String par0Str, String par1Str, String par2Str)
{
    boolean flag = false;
    String s = par0Str;
    Frame frame = new Frame("Minecraft");
    AWTGLCanvas awtglcanvas = new AWTGLCanvas();
    frame.setLayout(new BorderLayout());
    frame.add(awtglcanvas, "Center");
    awtglcanvas.setPreferredSize(new Dimension(854, 480));
    frame.pack();
    frame.setLocationRelativeTo(null);
    MinecraftImpl minecraftimpl = new MinecraftImpl(frame, awtglcanvas, 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));
    System.out.println((new StringBuilder()).append("LWJGL Version: ").append(Sys.getVersion()).toString());
    thread.start();
}

非常感谢您的帮助。:)

注意:在原始 bin 文件夹中,有两个名为 lwjgl.jar 和 lwjgl_util.jar 的 jar 文件以及我反编译的文件 minecraft.jar。这只是我把东西扔在那里,但你认为它们可能包含稍微改变版本的 lwjgl 类吗?

4

0 回答 0