Posted 30 July 2012 - 09:52 PM
Hi, i'm making a client for minecraft, and i'm not very good at Java at all.
What i'm trying to do is create a version.txt in the minecraft jar and print it on the main menu of the client, so when I update I don't have to change the code in eclipse, but all I have to do is update the txt.
Here's what I have so far:
But that is basically failing at life at this point. Any help guys?
What i'm trying to do is create a version.txt in the minecraft jar and print it on the main menu of the client, so when I update I don't have to change the code in eclipse, but all I have to do is update the txt.
Here's what I have so far:
BufferedReader a = new BufferedReader(new InputStreamReader((net.minecraft.src.GuiMainMenu.class).getResourceAsStream("/title/version.txt"), Charset.forName("UTF-8")));
try {
if(a.readLine() == null){
drawString(fontRenderer, "Cannot Find version.txt", 2, height - 10, 0xffff);
}
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
String bobby = a.toString();
drawString(fontRenderer, bobby, 2, height - 10, 0xffff);
But that is basically failing at life at this point. Any help guys?