Save/Load custom hack settings! [Save & Load] Example used: Setspeed

Posts 13 of 3 · Page 1 of 1
Save/Load custom hack settings! [Save & Load] Example used: Setspeed
Written this for those clients so u dont have to do .setspeed all over again

This is for a HACK client, not a Mod !

And if your wondering this is for the MCP (Minecraft Coders Pack)


File output:
Code:
any = File(file, "filename.txt");
To load your options:

Code:
if(!any.exists())
    {
    return;
    }
    BufferedReader bufferedreader = new BufferedReader(new FileReader(any));
    for(String s = ""; (s = bufferedreader.readLine()) != null;)
    {
    try
    {
    String as[] = s.split(" ");
    mc.gameSettings.saveOptions(Class.setspeed); // something along these lines);
    }
Output:

Code:
PrintWriter printwriter = new PrintWriter(new FileWriter(newfile));
    printwriter.println((new StringBuilder()).append("Set speed: ").append(Class.setspeed/*ss?*/).toString());
{
printwriter.close();
  }
Boolean
Code:
public File any;
And to change your speed when loading the options file

Code:
if(Class.changespeed //example)
  {
    Class.changespeed = setspeed; 
  }
Load setspeed int inside options:
Code:
Classname.setspeed = int;
Outcome: %appdata%\.minecraft

Since there's a space be sure to never save it as setspeed:1 (when editting the text file, you don't have to!)
setspeed: 1
Or else it won't read.

Make it catch your current int, if you have a setspeed it should be defining this, so just copy and paste it onto the variables I've listed
WDF? (non coders message
Thanks, this will work great for pre toggled options. Also, noobs who don't even know what a boolean is just gtfu
Posts 13 of 3 · Page 1 of 1

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?