我正在尝试使用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();
}
非常感谢你的帮助。 :)
注意: 在orriginal bin文件夹中有两个名为lwjgl.jar和lwjgl_util.jar的jar文件以及我反编译的文件来编写我的mod,minecraft.jar。这只是我扔东西,但你认为它们可能包含略有改变的lwjgl类版本吗?