Some refactoring, cleaning up, etc.
This commit is contained in:
parent
173a274b47
commit
ca0c96b204
1
.gitignore
vendored
1
.gitignore
vendored
@ -1,4 +1,3 @@
|
||||
*.class
|
||||
*.backup
|
||||
*.*~
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
*
|
||||
*
|
||||
*/
|
||||
package morlok8k.MinecraftLandGenerator;
|
||||
|
||||
@ -11,6 +11,12 @@ import java.util.ArrayList;
|
||||
*/
|
||||
public class Arraylist {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param list
|
||||
* @param remove
|
||||
* @return
|
||||
*/
|
||||
public static ArrayList<Coordinates> arrayListRemove(final ArrayList<Coordinates> list,
|
||||
final ArrayList<Coordinates> remove) {
|
||||
|
||||
@ -23,5 +29,4 @@ public class Arraylist {
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -21,6 +21,7 @@ public class Coordinates {
|
||||
*
|
||||
* @param StringOfCoords
|
||||
* A short- or long-form coordinate string as described at the two toString() methods
|
||||
* @return
|
||||
* @author Morlok8k
|
||||
*/
|
||||
public static Coordinates parseString(String StringOfCoords) {
|
||||
@ -88,6 +89,7 @@ public class Coordinates {
|
||||
*
|
||||
* @param stringOfCoords
|
||||
* A short- or long-form coordinate string as described at the two toString() methods
|
||||
* @return
|
||||
* @author jaseg
|
||||
*/
|
||||
public static Coordinates parseStringRegEx(String stringOfCoords) {
|
||||
@ -131,10 +133,17 @@ public class Coordinates {
|
||||
return new Coordinates(X, Y, Z);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public int X = 0;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public int Y = 0;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public int Z = 0;
|
||||
|
||||
/**
|
||||
@ -156,6 +165,9 @@ public class Coordinates {
|
||||
Z = z;
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public void clear() {
|
||||
X = 0;
|
||||
Y = 0;
|
||||
@ -242,7 +254,6 @@ public class Coordinates {
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
// Java Language Specific Crap Below... Stuff *gotta* be there so Java won't cry... //
|
||||
///////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* @param y
|
||||
* the y to set
|
||||
@ -274,6 +285,11 @@ public class Coordinates {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param Short
|
||||
* @return
|
||||
*/
|
||||
public String toString(final boolean Short) {
|
||||
if (Short) { // We are overloading toString with an additional option:
|
||||
return ("(" + X + "," + Z + ")"); // Basically just an option to return just X and Z (formatted differently as well: "(X,Z)")
|
||||
|
@ -10,6 +10,10 @@ import java.net.URL;
|
||||
|
||||
import org.w3c.bert_bos.UTF8URL.Unescape;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class DownloadFile {
|
||||
|
||||
/**
|
||||
@ -103,5 +107,4 @@ public class DownloadFile {
|
||||
}
|
||||
return success;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,8 +7,17 @@ import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class FileRead {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param file
|
||||
* @return
|
||||
*/
|
||||
public static ArrayList<Coordinates> readArrayListCoordLog(final String file) {
|
||||
|
||||
final ArrayList<Coordinates> Return = new ArrayList<Coordinates>();
|
||||
@ -65,8 +74,8 @@ public class FileRead {
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
*
|
||||
*/
|
||||
public static void readConf() {
|
||||
//TODO: element comment
|
||||
//String errorMsg = "";
|
||||
@ -183,5 +192,4 @@ public class FileRead {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,6 +5,10 @@ import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class FileWrite {
|
||||
|
||||
/**
|
||||
@ -16,7 +20,7 @@ public class FileWrite {
|
||||
*/
|
||||
public static void AppendTxtFile(final String file, final String appendTxt) {
|
||||
try {
|
||||
// Create file
|
||||
// Create file
|
||||
final FileWriter fstream = new FileWriter(file, true);
|
||||
final BufferedWriter out = new BufferedWriter(fstream);
|
||||
//String output = "Hello Java" + newLine;
|
||||
@ -42,7 +46,7 @@ public class FileWrite {
|
||||
|
||||
if (newConf) {
|
||||
jL = var.defaultJavaLine; // reads the default from a constant, makes it easier!
|
||||
sP = "."; //
|
||||
sP = "."; //
|
||||
} else {
|
||||
jL = var.javaLine; // we read these values from an existing Conf File.
|
||||
sP = var.serverPath; //
|
||||
@ -50,37 +54,37 @@ public class FileWrite {
|
||||
|
||||
String txt = null;
|
||||
//@formatter:off
|
||||
txt = "#" + var.PROG_NAME + " Configuration File: Version: " + var.VERSION + var.newLine
|
||||
+ "#Authors: " + var.AUTHORS + var.newLine
|
||||
+ "#Auto-Generated: " + var.dateFormat.format(var.date) + var.newLine
|
||||
+ var.newLine
|
||||
+ "#Line to run server:" + var.newLine
|
||||
+ "Java=" + jL // reads the default from a constant, makes it easier!
|
||||
+ var.newLine
|
||||
+ var.newLine
|
||||
+ "#Location of server. use \".\" for the same folder as MLG" + var.newLine
|
||||
+ "ServerPath=" + sP
|
||||
+ var.newLine
|
||||
+ var.newLine
|
||||
+ "#Strings read from the server" + var.newLine
|
||||
+ "Done_Text=[INFO] Done" + var.newLine
|
||||
+ "Preparing_Text=[INFO] Preparing spawn area:" + var.newLine
|
||||
+ "Preparing_Level=[INFO] Preparing start region for" + var.newLine
|
||||
+ "Level-0=The Overworld" + var.newLine
|
||||
+ "Level-1=The Nether" + var.newLine
|
||||
+ "Level-2=The End" + var.newLine
|
||||
+ "Level-3=Level 3 (Future Level)" + var.newLine
|
||||
+ "Level-4=Level 4 (Future Level)" + var.newLine
|
||||
+ "Level-5=Level 5 (Future Level)" + var.newLine
|
||||
+ "Level-6=Level 6 (Future Level)" + var.newLine
|
||||
+ "Level-7=Level 7 (Future Level)" + var.newLine
|
||||
+ "Level-8=Level 8 (Future Level)" + var.newLine
|
||||
+ "Level-9=Level 9 (Future Level)" + var.newLine
|
||||
+ var.newLine
|
||||
+ "#Optional: Wait a few seconds after saving." + var.newLine
|
||||
+ "WaitSave=false" + var.newLine
|
||||
+ "webLaunch=true";
|
||||
//@formatter:on
|
||||
txt = "#" + var.PROG_NAME + " Configuration File: Version: " + var.VERSION + var.newLine
|
||||
+ "#Authors: " + var.AUTHORS + var.newLine
|
||||
+ "#Auto-Generated: " + var.dateFormat.format(var.date) + var.newLine
|
||||
+ var.newLine
|
||||
+ "#Line to run server:" + var.newLine
|
||||
+ "Java=" + jL // reads the default from a constant, makes it easier!
|
||||
+ var.newLine
|
||||
+ var.newLine
|
||||
+ "#Location of server. use \".\" for the same folder as MLG" + var.newLine
|
||||
+ "ServerPath=" + sP
|
||||
+ var.newLine
|
||||
+ var.newLine
|
||||
+ "#Strings read from the server" + var.newLine
|
||||
+ "Done_Text=[INFO] Done" + var.newLine
|
||||
+ "Preparing_Text=[INFO] Preparing spawn area:" + var.newLine
|
||||
+ "Preparing_Level=[INFO] Preparing start region for" + var.newLine
|
||||
+ "Level-0=The Overworld" + var.newLine
|
||||
+ "Level-1=The Nether" + var.newLine
|
||||
+ "Level-2=The End" + var.newLine
|
||||
+ "Level-3=Level 3 (Future Level)" + var.newLine
|
||||
+ "Level-4=Level 4 (Future Level)" + var.newLine
|
||||
+ "Level-5=Level 5 (Future Level)" + var.newLine
|
||||
+ "Level-6=Level 6 (Future Level)" + var.newLine
|
||||
+ "Level-7=Level 7 (Future Level)" + var.newLine
|
||||
+ "Level-8=Level 8 (Future Level)" + var.newLine
|
||||
+ "Level-9=Level 9 (Future Level)" + var.newLine
|
||||
+ var.newLine
|
||||
+ "#Optional: Wait a few seconds after saving." + var.newLine
|
||||
+ "WaitSave=false" + var.newLine
|
||||
+ "webLaunch=true";
|
||||
//@formatter:on
|
||||
|
||||
writeTxtFile(var.MinecraftLandGeneratorConf, txt);
|
||||
|
||||
@ -116,5 +120,4 @@ public class FileWrite {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,10 +8,14 @@ import javax.swing.JPanel;
|
||||
import javax.swing.SwingConstants;
|
||||
import javax.swing.border.EmptyBorder;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class MLG_GUI extends JFrame {
|
||||
|
||||
private static final long serialVersionUID = -8791419906463664152L; //auto generated
|
||||
private JPanel contentPane;
|
||||
private final JPanel contentPane;
|
||||
|
||||
/**
|
||||
* Create the frame.
|
||||
@ -24,9 +28,8 @@ public class MLG_GUI extends JFrame {
|
||||
contentPane.setLayout(new BorderLayout(0, 0));
|
||||
setContentPane(contentPane);
|
||||
|
||||
JLabel lblHelloWorld = new JLabel("Hello World");
|
||||
final JLabel lblHelloWorld = new JLabel("Hello World");
|
||||
lblHelloWorld.setHorizontalAlignment(SwingConstants.CENTER);
|
||||
contentPane.add(lblHelloWorld, BorderLayout.CENTER);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,9 @@
|
||||
package morlok8k.MinecraftLandGenerator;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class Input_CLI {
|
||||
|
||||
/**
|
||||
@ -30,5 +34,4 @@ public class Input_CLI {
|
||||
return Return;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -9,6 +9,10 @@ import java.security.MessageDigest;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class MD5 {
|
||||
|
||||
/**
|
||||
@ -17,6 +21,10 @@ public class MD5 {
|
||||
* Thanks to R.J. Lorimer at <br>
|
||||
* <a href="http://www.javalobby.org/java/forums/t84420.html">http://www. javalobby.org/java/forums/t84420.html</a>
|
||||
*
|
||||
* @param fileName
|
||||
* @return
|
||||
* @throws NoSuchAlgorithmException
|
||||
* @throws FileNotFoundException
|
||||
* @author Morlok8k
|
||||
*/
|
||||
public static String fileMD5(final String fileName) throws NoSuchAlgorithmException,
|
||||
|
@ -23,9 +23,21 @@ import morlok8k.MinecraftLandGenerator.GUI.MLG_GUI;
|
||||
*/
|
||||
public class Main {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static int xRange = 0;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static int zRange = 0;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static Integer zOffset = null;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static Integer xOffset = null;
|
||||
|
||||
//////////////////////////////////////////////////////////
|
||||
@ -34,12 +46,10 @@ public class Main {
|
||||
// "final" means "constant" //
|
||||
// public/private shows/hides between classes //
|
||||
//////////////////////////////////////////////////////////
|
||||
|
||||
/**
|
||||
* @param args
|
||||
* the command line arguments
|
||||
*/
|
||||
|
||||
public static void main(String[] args) {
|
||||
var.startTime = System.currentTimeMillis();
|
||||
|
||||
@ -97,9 +107,9 @@ public class Main {
|
||||
@Override
|
||||
public void run() {
|
||||
try {
|
||||
MLG_GUI frame = new MLG_GUI();
|
||||
final MLG_GUI frame = new MLG_GUI();
|
||||
frame.setVisible(true);
|
||||
} catch (Exception e) {
|
||||
} catch (final Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
@ -128,7 +138,7 @@ public class Main {
|
||||
// The following displays no matter what happens, so we needed this date stuff to happen first.
|
||||
|
||||
Out.out(var.PROG_NAME + " version " + var.VERSION);
|
||||
Out.out("BuildID: (" + var.MLG_Last_Modified_Date.getTime() + ")"); // instead of dateformatting the buildid, we return the raw Long number.
|
||||
Out.out("BuildID: (" + var.MLG_Last_Modified_Date.getTime() + ")"); // instead of dateformatting the buildid, we return the raw Long number.
|
||||
// thus different timezones wont display a different buildID
|
||||
Out.out("This version was last modified on "
|
||||
+ var.dateFormat.format(var.MLG_Last_Modified_Date));
|
||||
@ -245,7 +255,7 @@ public class Main {
|
||||
}
|
||||
in.close();
|
||||
|
||||
if (var.recheckFlag == true) { // the first line is always the location of this file. the second is the recheck flag, if we want to.
|
||||
if (var.recheckFlag == true) { // the first line is always the location of this file. the second is the recheck flag, if we want to.
|
||||
try {
|
||||
recheckMD5 = MD5.fileMD5(config.toString());
|
||||
} catch (final NoSuchAlgorithmException e) {
|
||||
@ -444,7 +454,7 @@ public class Main {
|
||||
|
||||
// prepare our two ProcessBuilders
|
||||
// minecraft = new ProcessBuilder(javaLine, "-Xms1024m", "-Xmx1024m", "-jar", jarFile, "nogui");
|
||||
var.minecraft = new ProcessBuilder(var.javaLine.split("\\s")); // is this always going to work? i don't know. (most likely yes)
|
||||
var.minecraft = new ProcessBuilder(var.javaLine.split("\\s")); // is this always going to work? i don't know. (most likely yes)
|
||||
var.minecraft.directory(new File(var.serverPath));
|
||||
var.minecraft.redirectErrorStream(true);
|
||||
|
||||
@ -683,7 +693,7 @@ public class Main {
|
||||
var.webLaunch = false; //headless enviroment - cant bring up webpage!
|
||||
}
|
||||
final File web1 = new File("web");
|
||||
final File web2 = new File("web.txt"); //user has put in the magical file to not launch the webpage
|
||||
final File web2 = new File("web.txt"); //user has put in the magical file to not launch the webpage
|
||||
final File web3 = new File("web.txt.txt");
|
||||
if (web2.exists() || (web1.exists() || web3.exists())) { //check for "web.txt", if not found, check for "web", and if still not found, check for "web.txt.txt"
|
||||
var.webLaunch = false;
|
||||
|
@ -7,6 +7,10 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class Misc {
|
||||
|
||||
/**
|
||||
@ -57,5 +61,4 @@ public class Misc {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,9 @@
|
||||
package morlok8k.MinecraftLandGenerator;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class Out {
|
||||
|
||||
/**
|
||||
@ -56,5 +60,4 @@ public class Out {
|
||||
static void outS(final String str) {
|
||||
System.out.println("[Server] " + str);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,9 @@
|
||||
package morlok8k.MinecraftLandGenerator;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class Readme_and_HelpInfo {
|
||||
|
||||
/**
|
||||
@ -25,192 +29,192 @@ public class Readme_and_HelpInfo {
|
||||
final String n = var.newLine;
|
||||
|
||||
//@formatter:off
|
||||
ReadMeText = PROG_NAME + " version " + VERSION + n
|
||||
+ n
|
||||
+ "Updated " + MLG_Last_Modified_MDY + n
|
||||
+ "(BuildID: " + var.MLG_Last_Modified_Date.getTime() + ")" + n
|
||||
+ n
|
||||
+ "Original Code by Corrodias November 2010" + n
|
||||
+ "Enhanced Code by Morlok8k Feb. 2011 to Now (or at least to " + MLG_Last_Modified_MDY + "!)" + n
|
||||
+ "Additional Code by pr0f1x October 2011" + n
|
||||
+ n
|
||||
+ "Website: https://sites.google.com/site/minecraftlandgenerator/" + n
|
||||
+ "Forum: http://www.minecraftforum.net/topic/187737-minecraft-land-generator/" + n
|
||||
+ "Source: https://github.com/Morlok8k/MinecraftLandGenerator" + n
|
||||
+ n
|
||||
+ "-----------------------------------------------" + n
|
||||
+ n
|
||||
+ "This program lets you generate an area of land with your Minecraft SMP server (and is prossibly future-proof for newer versions). You set up your java command line and minecraft server paths in the MinecraftLandGenerator.conf file, set up the server's server.properties file with the name of the world you wish to use, and then run this program." + n
|
||||
+ "When a Minecraft server is launched, it automatically generates chunks within a square area of 25x25 chunks (400x400 blocks), centered on the current spawn point (formally 20x20 chunks, 320x320 blocks). When provided X and Z ranges as arguments, this program will launch the server repeatedly, editing the level.dat file between sessions, to generate large amounts of land without players having to explore them. The generated land will have about the X and Z ranges as requested by the arguments, though it will not be exact due to the spawn point typically not on the border of a chunk. (Because of this, MLG by default adds a slight overlap with each pass - 380x380 blocks) You can use the -x and -z switches to override the spawn offset and center the land generation on a different point." + n
|
||||
+ "The program makes a backup of level.dat as level_backup.dat before editing, and restores the backup at the end. In the event that a level_backup.dat file already exists, the program will refuse to proceed, leaving the user to determine why the level_backup.dat file exists and whether they would rather restore it or delete it, which must be done manually." + n
|
||||
+ n
|
||||
+ "This program is public domain, and the source code is included in the .jar file. (If accidently missing, like in 1.3.0 and 1.4.0, it is always available at Github.)" + n
|
||||
+ "The JNLP library is included (inside the .jar). It is not public domain. Its license is included, as LICENSE.TXT." + n
|
||||
+ "It is also available at: http://jnbt.sourceforge.net/" + n
|
||||
+ n
|
||||
+ "The \"unescape\" method/function is also not Public Domain. Its License is the W3C\u00A9 Software License, and located here: http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231"
|
||||
+ n
|
||||
+ "Other Public Domain code has been used in this program, and references to sources are included in the comments of " + PROG_NAME + "'s source code."
|
||||
+ n
|
||||
+ "-----------------------------------------------" + n
|
||||
+ n;
|
||||
//@formatter:on
|
||||
ReadMeText = PROG_NAME + " version " + VERSION + n
|
||||
+ n
|
||||
+ "Updated " + MLG_Last_Modified_MDY + n
|
||||
+ "(BuildID: " + var.MLG_Last_Modified_Date.getTime() + ")" + n
|
||||
+ n
|
||||
+ "Original Code by Corrodias November 2010" + n
|
||||
+ "Enhanced Code by Morlok8k Feb. 2011 to Now (or at least to " + MLG_Last_Modified_MDY + "!)" + n
|
||||
+ "Additional Code by pr0f1x October 2011" + n
|
||||
+ n
|
||||
+ "Website: https://sites.google.com/site/minecraftlandgenerator/" + n
|
||||
+ "Forum: http://www.minecraftforum.net/topic/187737-minecraft-land-generator/" + n
|
||||
+ "Source: https://github.com/Morlok8k/MinecraftLandGenerator" + n
|
||||
+ n
|
||||
+ "-----------------------------------------------" + n
|
||||
+ n
|
||||
+ "This program lets you generate an area of land with your Minecraft SMP server (and is prossibly future-proof for newer versions). You set up your java command line and minecraft server paths in the MinecraftLandGenerator.conf file, set up the server's server.properties file with the name of the world you wish to use, and then run this program." + n
|
||||
+ "When a Minecraft server is launched, it automatically generates chunks within a square area of 25x25 chunks (400x400 blocks), centered on the current spawn point (formally 20x20 chunks, 320x320 blocks). When provided X and Z ranges as arguments, this program will launch the server repeatedly, editing the level.dat file between sessions, to generate large amounts of land without players having to explore them. The generated land will have about the X and Z ranges as requested by the arguments, though it will not be exact due to the spawn point typically not on the border of a chunk. (Because of this, MLG by default adds a slight overlap with each pass - 380x380 blocks) You can use the -x and -z switches to override the spawn offset and center the land generation on a different point." + n
|
||||
+ "The program makes a backup of level.dat as level_backup.dat before editing, and restores the backup at the end. In the event that a level_backup.dat file already exists, the program will refuse to proceed, leaving the user to determine why the level_backup.dat file exists and whether they would rather restore it or delete it, which must be done manually." + n
|
||||
+ n
|
||||
+ "This program is public domain, and the source code is included in the .jar file. (If accidently missing, like in 1.3.0 and 1.4.0, it is always available at Github.)" + n
|
||||
+ "The JNLP library is included (inside the .jar). It is not public domain. Its license is included, as LICENSE.TXT." + n
|
||||
+ "It is also available at: http://jnbt.sourceforge.net/" + n
|
||||
+ n
|
||||
+ "The \"unescape\" method/function is also not Public Domain. Its License is the W3C\u00A9 Software License, and located here: http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231"
|
||||
+ n
|
||||
+ "Other Public Domain code has been used in this program, and references to sources are included in the comments of " + PROG_NAME + "'s source code."
|
||||
+ n
|
||||
+ "-----------------------------------------------" + n
|
||||
+ n;
|
||||
//@formatter:on
|
||||
|
||||
showHelpSTR = showHelp(false); //stored as a string for easier manipulation in the future
|
||||
|
||||
//@formatter:off
|
||||
VersionInfo = n
|
||||
+ "-----------------------------------------------" + n
|
||||
+ n
|
||||
+ "Version History:" + n
|
||||
+ "Morlok8k:" + n
|
||||
+ "1.7.1" + n
|
||||
+ "- Major Code Refactoring" + n
|
||||
+ "- TODO: %done tweak" + n //TODO
|
||||
+ "- TODO: outliers issue / region fix" + n
|
||||
+ "- TODO: 16/512 block selecting" + n
|
||||
+ "- TODO: remember that the outside is 400, not 380!" + n
|
||||
+ "- TODO: always calculate from orgin, just adjust outer box to match" + n
|
||||
+ "- TODO: recaculate existing coords with new code" + n
|
||||
+ "- TODO: change 380 to 384?" + n //TODO
|
||||
+ "1.7.0" + n
|
||||
+ "- Major Code Optimization" + n
|
||||
+ "- Drastically reduced the amount of time it takes for MLG to expand a world after it has already done so before!" + n
|
||||
+ " (To do this, I rewrote the Main loop of the program, and add my own Coordinate object)" + n
|
||||
+ "- Added Resume Functionality" + n
|
||||
+ "- Updated Time Output yet again." + n
|
||||
+ "- Made xx% output nicer by rewriting previous existing line." + n
|
||||
+ "- Misc. Tweaks" + n
|
||||
+ "- Misc. Additions" + n
|
||||
+ "1.6.3" + n
|
||||
+ "- Minor Code Optimization" + n
|
||||
+ "- Finely got on the ball and added the JNBT source and everything (as an internal .zip) to be completely faithful to his license" + n
|
||||
+ "- Also adding script files internally in the .jar for archive (or offline) purposes. (Manual Extract needed for use)" + n
|
||||
+ "- Modified output of MLG slightly to show whats the server and whats MLG. (I may do more with this later.)" + n
|
||||
+ "1.6.2" + n
|
||||
+ "- Major Code Optimization" + n
|
||||
+ "- Updated Time Output again. Now says \"1 Minute\" instead of \"1 Minutes\"." + n
|
||||
+ "- Updated Location Code - the center of the square is now truely centered, and it trys to get as close to the given size as possible." + n
|
||||
+ "- Added \"-nowait\" and its shorter version \"-n\"" + n
|
||||
+ "- Added currently non-functional RCON code. Will try to make functional in the future." + n
|
||||
+ n
|
||||
+ "1.6.11" + n
|
||||
+ "- Removed End-of-Generation ASCII-Graphic - It didn't really fit with MLG." + n
|
||||
+ "- Updated Time Output." + n
|
||||
+ "- Changed estimated time remaining to count all runs, not just the last four." + n
|
||||
+ "- Added the time it took to complete at the end of generation." + n
|
||||
+ n
|
||||
+ "1.6.1" + n
|
||||
+ "- Added some modifications for scripting (Mainly for a new Initial setup script)" + n
|
||||
+ "- Changed MLG's Y to Z. Now it matches Minecraft. Y in the game is Height." + n
|
||||
+ "- Renamed -y switch to -z. MLG will remain backwards compatible if you use the old -y switch." + n
|
||||
+ "- Updated -printspawn to show X,Y,Z" + n
|
||||
+ "- Added End-of-Generation ASCII-Graphic" + n
|
||||
+ "- Slightly altered some text output" + n
|
||||
+ n
|
||||
+ "1.6.05" + n
|
||||
+ "- MLG displays if the server is converting the Map format, when not in verbose mode. (McRegion -> Anvil, or Chunk-File -> McRegion)" + n
|
||||
+ "- Minor fixes/edits/typos" + n
|
||||
+ "- Added link to new MLG website to readme file"
|
||||
+ n
|
||||
+ "1.6.03" + n
|
||||
+ "- added decoding of escape characters of URL's (so a space is a \" \" and not \"%20\")" + n
|
||||
+ "- added \"-downloadlist [list]\" where [list] is a text file with URL's on each line" + n
|
||||
+ n
|
||||
+ "1.6.02" + n
|
||||
+ "- small fix on caculating md5sum where old version didnt pad out to 32chars with zeros on the left side"
|
||||
+ "- quick Archive intergity fix after injecting source code into .jar after it compiled."
|
||||
+ "- no new functionality, md5 issue doesnt affect -update on old versions."
|
||||
+ n
|
||||
+ "1.6.0" + n
|
||||
+ "- NOW DOES NOT NEED ANY SCRIPT FILES!" + n
|
||||
+ "- Added the ability to download files from the internet" + n
|
||||
+ "- Added a switch to download any file off the internet, if needed (useless for most people, but included it in case I wanted it in the future.)" + n
|
||||
+ "- Added the ability to check what version the .jar is. (Using MD5 hashes, timestamps, and the BuildID file)" + n
|
||||
+ "- Added \"-update\" to download new versions of MLG directly from github." + n
|
||||
+ "- Updated estimated time. Now shows up on loop 2+ instead of loop 4+." + n
|
||||
+ "- Standard % output of the Server should look nicer now." + n
|
||||
+ "- Code Refactoring" + n
|
||||
+ "- Code Formatting" + n
|
||||
+ "- Code Optimization" + n
|
||||
+ "- Duplicate sections of code have been turned into Methods/\"Functions\"" + n
|
||||
+ n
|
||||
+ "1.5.1" + n
|
||||
+ "- pr0f1x: Added the \"save-all\" command to be sent to the server before shutting it down." + n
|
||||
+ "- pr0f1x: Added a 40 second wait before shutting down." + n
|
||||
+ "- Morlok8k: Made 40 second wait optional." + n
|
||||
+ "- Morlok8k: Changed the Dimensions code. (I had assumed it would be DIM-1, DIM-2, etc. but it turned out to be DIM-1 and DIM1. Change reflects Server output of \"Level n\")" + n
|
||||
+ "- Morlok8k: Config file is automatically updated to reflect these changes." + n
|
||||
+ "- Morlok8k: Cleaned up code." + n
|
||||
+ n
|
||||
+ "1.5.0" + n
|
||||
+ "- Supports Server Beta 1.6.4 (& hopefully future versions as well, while remaining backward compatible.)" + n
|
||||
+ "- Added \"-a\",\"-alt\" to use alternate method (a slightly simplier version of 1.3.0's code - pure verbose only)" + n
|
||||
+ "- Added world specific output for 9 dimensions (DIM-1 is the Nether, DIM-2 through DIM-9 dont exist yet, but if and when they do, you can configure it's text). (\"Level 0\", the default world, is displayed as the worlds name)" + n
|
||||
+ "- Updated Config File for these Dimensions." + n
|
||||
+ "- Reads and outputs the Seed to the output. (If you had used text for the Seed, Minecraft converts it into a number. This outputs the number.)" + n
|
||||
+ "- Changed the default 300 blocks to 380. The server now makes a 400x400 square block terrain instead of 320x320. Thus it is faster because there are less loops. To use the old way, use \"-i300\"" + n
|
||||
+ "- Added total Percentage done (technically, it displays the % done once the server finishes...)" + n
|
||||
+ "- Added debugging output vars of conf file (disabled - need to re-compile source to activate)" + n
|
||||
+ n
|
||||
+ "\t\t+ (the goal is to have MLG be configureable, so it can work on any version of the server, past or present.)" + n
|
||||
+ n
|
||||
+ "*** 1.4.5 (pre 1.5.0) ***" + n
|
||||
+ "- sorry! I shouldn't release untested code..." + n
|
||||
+ "*************************" + n
|
||||
+ n
|
||||
+ "1.4.4" + n
|
||||
+ "- Added ablilty to ignore [WARNING] and [SEVERE] errors with \"-w\"" + n
|
||||
+ n
|
||||
+ "1.4.3" + n
|
||||
+ "- Fixed \"-ps\",\"-printspawn\" as I had forgot I had broken it in 1.4.0 - due to config file change." + n
|
||||
+ n
|
||||
+ "1.4.2" + n
|
||||
+ "- No New Features" + n
|
||||
+ "- Changed non-verbose mode to display server progress on the same line, saving a lot of space." + n
|
||||
+ " - This couldn't wait for 1.5.0 ... I (Morlok8k) liked it too much." + n
|
||||
+ n
|
||||
+ "1.4.0" + n
|
||||
+ "- Future Proofing" + n
|
||||
+ "- Configurble Server Message reading. (If server updates and breaks MLG, you can add the new text!)" + n
|
||||
+ "- Updated config file, and auto updating from old format." + n
|
||||
+ "- Added % of spawn area to non-verbose output." + n
|
||||
+ "- Removed datetime stamps from server output in verbose mode" + n
|
||||
+ "- Other Misc fixes." + n
|
||||
+ n
|
||||
+ "1.3.0" + n
|
||||
+ "- Fixed Problems with Minecraft Beta 1.3 -- Morlok8k" + n
|
||||
+ n
|
||||
+ "-----------------------------------------------" + n
|
||||
+ n
|
||||
+ "Corrodias:" + n
|
||||
+ "1.2.0" + n
|
||||
+ "- land generation now centers on the spawn point instead of [0, 0]" + n
|
||||
+ "- the server is launched once before the spawn point is changed, to verify that it can run and to create a world if one doesn't exist" + n
|
||||
+ "- added -printspawn [-ps] switch to print the current spawn coordinates to the console" + n
|
||||
+ "- added -x and -y switches to override the X and Y offsets" + n
|
||||
+ "- added -v switch, does the same as -verbose" + n
|
||||
+ "- improved status message spacing to make things easier to read" + n
|
||||
+ "- improved time estimation algorithm: it now averages the last 3 launches" + n
|
||||
+ n
|
||||
+ "1.1.0" + n
|
||||
+ "- added MinecraftLandGenerator.conf file to hold the java command line and the server path" + n
|
||||
+ "- added -conf solo switch to generate a .conf file" + n
|
||||
+ "- added -verbose switch to output server output to the console (default is to ignore it)" + n
|
||||
+ "- added -i switch to allow customizing the block increment size (default is 300)" + n
|
||||
+ "- added instructions output in this version, i think" + n
|
||||
+ "- improved status message output to include current iteration and total iterations" + n
|
||||
+ n
|
||||
+ "1.0.0" + n
|
||||
+ "- initial release" + n
|
||||
+ n
|
||||
+ "-----------------------------------------------" + n
|
||||
+ n
|
||||
+ "Notes:" + n
|
||||
+ "Due to changes in server beta 1.6, it now generates the nether as well as the world at the same time." + n
|
||||
+ "However, Since beta 1.9 and Minecraft 1.0, the nether or the end is no longer generated."
|
||||
+ "I recommend using MCEDIT to relight the map after you generate it. This will take a long time, but should fix all those incorrectly dark spots in your level." + n;
|
||||
//@formatter:on
|
||||
VersionInfo = n
|
||||
+ "-----------------------------------------------" + n
|
||||
+ n
|
||||
+ "Version History:" + n
|
||||
+ "Morlok8k:" + n
|
||||
+ "1.7.1" + n
|
||||
+ "- Major Code Refactoring" + n
|
||||
+ "- TODO: %done tweak" + n //TODO
|
||||
+ "- TODO: outliers issue / region fix" + n
|
||||
+ "- TODO: 16/512 block selecting" + n
|
||||
+ "- TODO: remember that the outside is 400, not 380!" + n
|
||||
+ "- TODO: always calculate from orgin, just adjust outer box to match" + n
|
||||
+ "- TODO: recaculate existing coords with new code" + n
|
||||
+ "- TODO: change 380 to 384?" + n //TODO
|
||||
+ "1.7.0" + n
|
||||
+ "- Major Code Optimization" + n
|
||||
+ "- Drastically reduced the amount of time it takes for MLG to expand a world after it has already done so before!" + n
|
||||
+ " (To do this, I rewrote the Main loop of the program, and add my own Coordinate object)" + n
|
||||
+ "- Added Resume Functionality" + n
|
||||
+ "- Updated Time Output yet again." + n
|
||||
+ "- Made xx% output nicer by rewriting previous existing line." + n
|
||||
+ "- Misc. Tweaks" + n
|
||||
+ "- Misc. Additions" + n
|
||||
+ "1.6.3" + n
|
||||
+ "- Minor Code Optimization" + n
|
||||
+ "- Finely got on the ball and added the JNBT source and everything (as an internal .zip) to be completely faithful to his license" + n
|
||||
+ "- Also adding script files internally in the .jar for archive (or offline) purposes. (Manual Extract needed for use)" + n
|
||||
+ "- Modified output of MLG slightly to show whats the server and whats MLG. (I may do more with this later.)" + n
|
||||
+ "1.6.2" + n
|
||||
+ "- Major Code Optimization" + n
|
||||
+ "- Updated Time Output again. Now says \"1 Minute\" instead of \"1 Minutes\"." + n
|
||||
+ "- Updated Location Code - the center of the square is now truely centered, and it trys to get as close to the given size as possible." + n
|
||||
+ "- Added \"-nowait\" and its shorter version \"-n\"" + n
|
||||
+ "- Added currently non-functional RCON code. Will try to make functional in the future." + n
|
||||
+ n
|
||||
+ "1.6.11" + n
|
||||
+ "- Removed End-of-Generation ASCII-Graphic - It didn't really fit with MLG." + n
|
||||
+ "- Updated Time Output." + n
|
||||
+ "- Changed estimated time remaining to count all runs, not just the last four." + n
|
||||
+ "- Added the time it took to complete at the end of generation." + n
|
||||
+ n
|
||||
+ "1.6.1" + n
|
||||
+ "- Added some modifications for scripting (Mainly for a new Initial setup script)" + n
|
||||
+ "- Changed MLG's Y to Z. Now it matches Minecraft. Y in the game is Height." + n
|
||||
+ "- Renamed -y switch to -z. MLG will remain backwards compatible if you use the old -y switch." + n
|
||||
+ "- Updated -printspawn to show X,Y,Z" + n
|
||||
+ "- Added End-of-Generation ASCII-Graphic" + n
|
||||
+ "- Slightly altered some text output" + n
|
||||
+ n
|
||||
+ "1.6.05" + n
|
||||
+ "- MLG displays if the server is converting the Map format, when not in verbose mode. (McRegion -> Anvil, or Chunk-File -> McRegion)" + n
|
||||
+ "- Minor fixes/edits/typos" + n
|
||||
+ "- Added link to new MLG website to readme file"
|
||||
+ n
|
||||
+ "1.6.03" + n
|
||||
+ "- added decoding of escape characters of URL's (so a space is a \" \" and not \"%20\")" + n
|
||||
+ "- added \"-downloadlist [list]\" where [list] is a text file with URL's on each line" + n
|
||||
+ n
|
||||
+ "1.6.02" + n
|
||||
+ "- small fix on caculating md5sum where old version didnt pad out to 32chars with zeros on the left side"
|
||||
+ "- quick Archive intergity fix after injecting source code into .jar after it compiled."
|
||||
+ "- no new functionality, md5 issue doesnt affect -update on old versions."
|
||||
+ n
|
||||
+ "1.6.0" + n
|
||||
+ "- NOW DOES NOT NEED ANY SCRIPT FILES!" + n
|
||||
+ "- Added the ability to download files from the internet" + n
|
||||
+ "- Added a switch to download any file off the internet, if needed (useless for most people, but included it in case I wanted it in the future.)" + n
|
||||
+ "- Added the ability to check what version the .jar is. (Using MD5 hashes, timestamps, and the BuildID file)" + n
|
||||
+ "- Added \"-update\" to download new versions of MLG directly from github." + n
|
||||
+ "- Updated estimated time. Now shows up on loop 2+ instead of loop 4+." + n
|
||||
+ "- Standard % output of the Server should look nicer now." + n
|
||||
+ "- Code Refactoring" + n
|
||||
+ "- Code Formatting" + n
|
||||
+ "- Code Optimization" + n
|
||||
+ "- Duplicate sections of code have been turned into Methods/\"Functions\"" + n
|
||||
+ n
|
||||
+ "1.5.1" + n
|
||||
+ "- pr0f1x: Added the \"save-all\" command to be sent to the server before shutting it down." + n
|
||||
+ "- pr0f1x: Added a 40 second wait before shutting down." + n
|
||||
+ "- Morlok8k: Made 40 second wait optional." + n
|
||||
+ "- Morlok8k: Changed the Dimensions code. (I had assumed it would be DIM-1, DIM-2, etc. but it turned out to be DIM-1 and DIM1. Change reflects Server output of \"Level n\")" + n
|
||||
+ "- Morlok8k: Config file is automatically updated to reflect these changes." + n
|
||||
+ "- Morlok8k: Cleaned up code." + n
|
||||
+ n
|
||||
+ "1.5.0" + n
|
||||
+ "- Supports Server Beta 1.6.4 (& hopefully future versions as well, while remaining backward compatible.)" + n
|
||||
+ "- Added \"-a\",\"-alt\" to use alternate method (a slightly simplier version of 1.3.0's code - pure verbose only)" + n
|
||||
+ "- Added world specific output for 9 dimensions (DIM-1 is the Nether, DIM-2 through DIM-9 dont exist yet, but if and when they do, you can configure it's text). (\"Level 0\", the default world, is displayed as the worlds name)" + n
|
||||
+ "- Updated Config File for these Dimensions." + n
|
||||
+ "- Reads and outputs the Seed to the output. (If you had used text for the Seed, Minecraft converts it into a number. This outputs the number.)" + n
|
||||
+ "- Changed the default 300 blocks to 380. The server now makes a 400x400 square block terrain instead of 320x320. Thus it is faster because there are less loops. To use the old way, use \"-i300\"" + n
|
||||
+ "- Added total Percentage done (technically, it displays the % done once the server finishes...)" + n
|
||||
+ "- Added debugging output vars of conf file (disabled - need to re-compile source to activate)" + n
|
||||
+ n
|
||||
+ "\t\t+ (the goal is to have MLG be configureable, so it can work on any version of the server, past or present.)" + n
|
||||
+ n
|
||||
+ "*** 1.4.5 (pre 1.5.0) ***" + n
|
||||
+ "- sorry! I shouldn't release untested code..." + n
|
||||
+ "*************************" + n
|
||||
+ n
|
||||
+ "1.4.4" + n
|
||||
+ "- Added ablilty to ignore [WARNING] and [SEVERE] errors with \"-w\"" + n
|
||||
+ n
|
||||
+ "1.4.3" + n
|
||||
+ "- Fixed \"-ps\",\"-printspawn\" as I had forgot I had broken it in 1.4.0 - due to config file change." + n
|
||||
+ n
|
||||
+ "1.4.2" + n
|
||||
+ "- No New Features" + n
|
||||
+ "- Changed non-verbose mode to display server progress on the same line, saving a lot of space." + n
|
||||
+ " - This couldn't wait for 1.5.0 ... I (Morlok8k) liked it too much." + n
|
||||
+ n
|
||||
+ "1.4.0" + n
|
||||
+ "- Future Proofing" + n
|
||||
+ "- Configurble Server Message reading. (If server updates and breaks MLG, you can add the new text!)" + n
|
||||
+ "- Updated config file, and auto updating from old format." + n
|
||||
+ "- Added % of spawn area to non-verbose output." + n
|
||||
+ "- Removed datetime stamps from server output in verbose mode" + n
|
||||
+ "- Other Misc fixes." + n
|
||||
+ n
|
||||
+ "1.3.0" + n
|
||||
+ "- Fixed Problems with Minecraft Beta 1.3 -- Morlok8k" + n
|
||||
+ n
|
||||
+ "-----------------------------------------------" + n
|
||||
+ n
|
||||
+ "Corrodias:" + n
|
||||
+ "1.2.0" + n
|
||||
+ "- land generation now centers on the spawn point instead of [0, 0]" + n
|
||||
+ "- the server is launched once before the spawn point is changed, to verify that it can run and to create a world if one doesn't exist" + n
|
||||
+ "- added -printspawn [-ps] switch to print the current spawn coordinates to the console" + n
|
||||
+ "- added -x and -y switches to override the X and Y offsets" + n
|
||||
+ "- added -v switch, does the same as -verbose" + n
|
||||
+ "- improved status message spacing to make things easier to read" + n
|
||||
+ "- improved time estimation algorithm: it now averages the last 3 launches" + n
|
||||
+ n
|
||||
+ "1.1.0" + n
|
||||
+ "- added MinecraftLandGenerator.conf file to hold the java command line and the server path" + n
|
||||
+ "- added -conf solo switch to generate a .conf file" + n
|
||||
+ "- added -verbose switch to output server output to the console (default is to ignore it)" + n
|
||||
+ "- added -i switch to allow customizing the block increment size (default is 300)" + n
|
||||
+ "- added instructions output in this version, i think" + n
|
||||
+ "- improved status message output to include current iteration and total iterations" + n
|
||||
+ n
|
||||
+ "1.0.0" + n
|
||||
+ "- initial release" + n
|
||||
+ n
|
||||
+ "-----------------------------------------------" + n
|
||||
+ n
|
||||
+ "Notes:" + n
|
||||
+ "Due to changes in server beta 1.6, it now generates the nether as well as the world at the same time." + n
|
||||
+ "However, Since beta 1.9 and Minecraft 1.0, the nether or the end is no longer generated."
|
||||
+ "I recommend using MCEDIT to relight the map after you generate it. This will take a long time, but should fix all those incorrectly dark spots in your level." + n;
|
||||
//@formatter:on
|
||||
|
||||
FileWrite.writeTxtFile(readmeFile, ReadMeText + showHelpSTR + VersionInfo);
|
||||
|
||||
@ -223,6 +227,7 @@ public class Readme_and_HelpInfo {
|
||||
* <br>
|
||||
* Set TRUE to display info to System.out. (Returns null) <br>
|
||||
* Set FALSE to return info as String.
|
||||
* @return
|
||||
* @author Morlok8k
|
||||
*/
|
||||
public static String showHelp(final boolean SysOut) {
|
||||
@ -233,72 +238,72 @@ public class Readme_and_HelpInfo {
|
||||
}
|
||||
|
||||
//@formatter:off
|
||||
Str = "Usage: java -jar " + var.MLGFileNameShort + " x z [serverpath] [switches]" + n
|
||||
+ n
|
||||
+ "Arguments:" + n
|
||||
+ " x : X range to generate" + n
|
||||
+ " z : Z range to generate" + n
|
||||
+ " serverpath : the path to the directory in which the server runs (takes precedence over the config file setting)" + n
|
||||
+ n
|
||||
+ "Switches:" + n
|
||||
+ " -verbose : causes the application to output the server's messages to the console" + n
|
||||
+ " -v : same as -verbose" + n
|
||||
+ " -w : Ignore [WARNING] and [SEVERE] messages." + n
|
||||
+ " -alt : alternate server launch sequence" + n
|
||||
+ " -a : same as -alt" + n
|
||||
+ " -nowait : don't pause for anything" + n
|
||||
+ " -n : same as -nowait" + n
|
||||
+ " -i# : override the iteration spawn offset increment (default 380) (example: -i100)" + n
|
||||
+ " -x# : set the X offset to generate land around (example: -x0 or -x1000 or -x-500)" + n
|
||||
+ " -z# : set the Z offset to generate land around (example: -z0 or -z1000 or -z-500)" + n
|
||||
+ n
|
||||
+ "Other options:" + n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -update" + n
|
||||
+ " Checks for and downloads new versions of MLG online." + n
|
||||
+ n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -printspawn" + n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -ps" + n
|
||||
+ " Outputs the current world's spawn point coordinates." + n
|
||||
+ n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -conf" + n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -conf download" + n
|
||||
+ " Generates or downloads a "+ var.MinecraftLandGeneratorConf + " file." + n
|
||||
+ n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -readme readme.txt" + n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -readme" + n
|
||||
+ " Generates a readme file using supplied name or the default " + var.defaultReadmeFile + n
|
||||
+ n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -downloadfile http://example.com/file.txt" + n
|
||||
+ " Downloads whatever file from the internet you give it." + n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -downloadlist list.txt" + n
|
||||
+ " list.txt (or any other file) contains a URL on each line which will be downloaded." + n
|
||||
+ n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -version" + n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -help" + n
|
||||
+ " java -jar " + var.MLGFileNameShort + " /?" + n
|
||||
+ " Prints this message." + n
|
||||
+ n
|
||||
+ "When launched with the -conf switch, this application creates a " + var.MinecraftLandGeneratorConf + " file that contains configuration options." + n
|
||||
+ "If this file does not exist or does not contain all required properties, the application will not run." + n
|
||||
+ n
|
||||
+ var.MinecraftLandGeneratorConf + " properties:" + n
|
||||
+ " Java : The command line to use to launch the server" + n
|
||||
+ " ServerPath : The path to the directory in which the server runs (can be overridden by the serverpath argument)" + n
|
||||
+ " Done_Text : The output from the server that tells us that we are done" + n
|
||||
+ " Preparing_Text : The output from the server that tells us the percentage" + n
|
||||
+ "Preparing_Level : The output from the server that tells us the level it is working on" + n
|
||||
+ " Level-0 : Name of Level 0: The Overworld" + n
|
||||
+ " Level-1 : Name of Level 1: The Nether" + n
|
||||
+ " Level-2 : Name of Level 2: The End" + n
|
||||
+ " Level-3 : Name of Level 3: (Future Level)" + n
|
||||
+ " Level-4 : Name of Level 4: (Future Level)" + n
|
||||
+ " Level-5 : Name of Level 5: (Future Level)" + n
|
||||
+ " Level-6 : Name of Level 6: (Future Level)" + n
|
||||
+ " Level-7 : Name of Level 7: (Future Level)" + n
|
||||
+ " Level-8 : Name of Level 8: (Future Level)" + n
|
||||
+ " Level-9 : Name of Level 9: (Future Level)" + n
|
||||
+ " WaitSave : Optional: Wait before saving." + n;
|
||||
//@formatter:on
|
||||
Str = "Usage: java -jar " + var.MLGFileNameShort + " x z [serverpath] [switches]" + n
|
||||
+ n
|
||||
+ "Arguments:" + n
|
||||
+ " x : X range to generate" + n
|
||||
+ " z : Z range to generate" + n
|
||||
+ " serverpath : the path to the directory in which the server runs (takes precedence over the config file setting)" + n
|
||||
+ n
|
||||
+ "Switches:" + n
|
||||
+ " -verbose : causes the application to output the server's messages to the console" + n
|
||||
+ " -v : same as -verbose" + n
|
||||
+ " -w : Ignore [WARNING] and [SEVERE] messages." + n
|
||||
+ " -alt : alternate server launch sequence" + n
|
||||
+ " -a : same as -alt" + n
|
||||
+ " -nowait : don't pause for anything" + n
|
||||
+ " -n : same as -nowait" + n
|
||||
+ " -i# : override the iteration spawn offset increment (default 380) (example: -i100)" + n
|
||||
+ " -x# : set the X offset to generate land around (example: -x0 or -x1000 or -x-500)" + n
|
||||
+ " -z# : set the Z offset to generate land around (example: -z0 or -z1000 or -z-500)" + n
|
||||
+ n
|
||||
+ "Other options:" + n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -update" + n
|
||||
+ " Checks for and downloads new versions of MLG online." + n
|
||||
+ n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -printspawn" + n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -ps" + n
|
||||
+ " Outputs the current world's spawn point coordinates." + n
|
||||
+ n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -conf" + n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -conf download" + n
|
||||
+ " Generates or downloads a " + var.MinecraftLandGeneratorConf + " file." + n
|
||||
+ n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -readme readme.txt" + n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -readme" + n
|
||||
+ " Generates a readme file using supplied name or the default " + var.defaultReadmeFile + n
|
||||
+ n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -downloadfile http://example.com/file.txt" + n
|
||||
+ " Downloads whatever file from the internet you give it." + n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -downloadlist list.txt" + n
|
||||
+ " list.txt (or any other file) contains a URL on each line which will be downloaded." + n
|
||||
+ n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -version" + n
|
||||
+ " java -jar " + var.MLGFileNameShort + " -help" + n
|
||||
+ " java -jar " + var.MLGFileNameShort + " /?" + n
|
||||
+ " Prints this message." + n
|
||||
+ n
|
||||
+ "When launched with the -conf switch, this application creates a " + var.MinecraftLandGeneratorConf + " file that contains configuration options." + n
|
||||
+ "If this file does not exist or does not contain all required properties, the application will not run." + n
|
||||
+ n
|
||||
+ var.MinecraftLandGeneratorConf + " properties:" + n
|
||||
+ " Java : The command line to use to launch the server" + n
|
||||
+ " ServerPath : The path to the directory in which the server runs (can be overridden by the serverpath argument)" + n
|
||||
+ " Done_Text : The output from the server that tells us that we are done" + n
|
||||
+ " Preparing_Text : The output from the server that tells us the percentage" + n
|
||||
+ "Preparing_Level : The output from the server that tells us the level it is working on" + n
|
||||
+ " Level-0 : Name of Level 0: The Overworld" + n
|
||||
+ " Level-1 : Name of Level 1: The Nether" + n
|
||||
+ " Level-2 : Name of Level 2: The End" + n
|
||||
+ " Level-3 : Name of Level 3: (Future Level)" + n
|
||||
+ " Level-4 : Name of Level 4: (Future Level)" + n
|
||||
+ " Level-5 : Name of Level 5: (Future Level)" + n
|
||||
+ " Level-6 : Name of Level 6: (Future Level)" + n
|
||||
+ " Level-7 : Name of Level 7: (Future Level)" + n
|
||||
+ " Level-8 : Name of Level 8: (Future Level)" + n
|
||||
+ " Level-9 : Name of Level 9: (Future Level)" + n
|
||||
+ " WaitSave : Optional: Wait before saving." + n;
|
||||
//@formatter:on
|
||||
|
||||
String returnString = null;
|
||||
|
||||
@ -311,5 +316,4 @@ public class Readme_and_HelpInfo {
|
||||
return returnString;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,8 +4,16 @@ import java.lang.management.ManagementFactory;
|
||||
import java.lang.management.RuntimeMXBean;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class SelfAware {
|
||||
|
||||
/**
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public static String JVMinfo() {
|
||||
|
||||
String Return = "";
|
||||
@ -34,5 +42,4 @@ public class SelfAware {
|
||||
Return = Return.trim();
|
||||
return Return;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -5,14 +5,17 @@ import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.OutputStream;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class Server {
|
||||
|
||||
/**
|
||||
* Starts the process in the given ProcessBuilder, monitors its output for a "[INFO] Done!" message, and sends it a "stop\r\n" message. One message is printed to the console before launching and
|
||||
* one is printed to the console when the Done! message is detected. If "verbose" is true, the process's output will also be printed to the console.
|
||||
*
|
||||
* @param minecraft
|
||||
*
|
||||
* @return
|
||||
* @throws IOException
|
||||
* @author Corrodias
|
||||
*/
|
||||
@ -298,5 +301,4 @@ public class Server {
|
||||
// while loop has finished now.
|
||||
return serverSuccess;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -15,6 +15,10 @@ import org.jnbt.NBTInputStream;
|
||||
import org.jnbt.NBTOutputStream;
|
||||
import org.jnbt.Tag;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class SpawnPoint {
|
||||
|
||||
//TODO: update this
|
||||
@ -76,34 +80,34 @@ public class SpawnPoint {
|
||||
input.close();
|
||||
|
||||
//@formatter:off
|
||||
|
||||
//Note: The Following Information is Old (from 2010), compared to the Data inside a current "level.dat".
|
||||
//However, What we look at (SpawnX,Y,Z and RandomSeed) have not changed.
|
||||
|
||||
/* <editor-fold defaultstate="collapsed" desc="structure">
|
||||
* Structure:
|
||||
*
|
||||
*TAG_Compound("Data"): World data.
|
||||
* * TAG_Long("Time"): Stores the current "time of day" in ticks. There are 20 ticks per real-life second, and 24000 ticks per Minecraft day, making the day length 20 minutes. 0 appears to be sunrise, 12000 sunset and 24000 sunrise again.
|
||||
* * TAG_Long("LastPlayed"): Stores the Unix time stamp (in milliseconds) when the player saved the game.
|
||||
* * TAG_Compound("Player"): Player entity information. See Entity Format and Mob Entity Format for details. Has additional elements:
|
||||
* o TAG_List("Inventory"): Each TAG_Compound in this list defines an item the player is carrying, holding, or wearing as armor.
|
||||
* + TAG_Compound: Inventory item data
|
||||
* # TAG_Short("id"): Item or Block ID.
|
||||
* # TAG_Short("Damage"): The amount of wear each item has suffered. 0 means undamaged. When the Damage exceeds the item's durability, it breaks and disappears. Only tools and armor accumulate damage normally.
|
||||
* # TAG_Byte("Count"): Number of items stacked in this inventory slot. Any item can be stacked, including tools, armor, and vehicles. Range is 1-255. Values above 127 are not displayed in-game.
|
||||
* # TAG_Byte("Slot"): Indicates which inventory slot this item is in.
|
||||
* o TAG_Int("Score"): Current score, doesn't appear to be implemented yet. Always 0.
|
||||
* * TAG_Int("SpawnX"): X coordinate of the player's spawn position. Default is 0.
|
||||
* * TAG_Int("SpawnY"): Y coordinate of the player's spawn position. Default is 64.
|
||||
* * TAG_Int("SpawnZ"): Z coordinate of the player's spawn position. Default is 0.
|
||||
* * TAG_Byte("SnowCovered"): 1 enables, 0 disables, see Winter Mode
|
||||
* * TAG_Long("SizeOnDisk"): Estimated size of the entire world in bytes.
|
||||
* * TAG_Long("RandomSeed"): Random number providing the Random Seed for the terrain.
|
||||
* </editor-fold>
|
||||
*/
|
||||
|
||||
//@formatter:on
|
||||
|
||||
//Note: The Following Information is Old (from 2010), compared to the Data inside a current "level.dat".
|
||||
//However, What we look at (SpawnX,Y,Z and RandomSeed) have not changed.
|
||||
|
||||
/* <editor-fold defaultstate="collapsed" desc="structure">
|
||||
* Structure:
|
||||
*
|
||||
*TAG_Compound("Data"): World data.
|
||||
* * TAG_Long("Time"): Stores the current "time of day" in ticks. There are 20 ticks per real-life second, and 24000 ticks per Minecraft day, making the day length 20 minutes. 0 appears to be sunrise, 12000 sunset and 24000 sunrise again.
|
||||
* * TAG_Long("LastPlayed"): Stores the Unix time stamp (in milliseconds) when the player saved the game.
|
||||
* * TAG_Compound("Player"): Player entity information. See Entity Format and Mob Entity Format for details. Has additional elements:
|
||||
* o TAG_List("Inventory"): Each TAG_Compound in this list defines an item the player is carrying, holding, or wearing as armor.
|
||||
* + TAG_Compound: Inventory item data
|
||||
* # TAG_Short("id"): Item or Block ID.
|
||||
* # TAG_Short("Damage"): The amount of wear each item has suffered. 0 means undamaged. When the Damage exceeds the item's durability, it breaks and disappears. Only tools and armor accumulate damage normally.
|
||||
* # TAG_Byte("Count"): Number of items stacked in this inventory slot. Any item can be stacked, including tools, armor, and vehicles. Range is 1-255. Values above 127 are not displayed in-game.
|
||||
* # TAG_Byte("Slot"): Indicates which inventory slot this item is in.
|
||||
* o TAG_Int("Score"): Current score, doesn't appear to be implemented yet. Always 0.
|
||||
* * TAG_Int("SpawnX"): X coordinate of the player's spawn position. Default is 0.
|
||||
* * TAG_Int("SpawnY"): Y coordinate of the player's spawn position. Default is 64.
|
||||
* * TAG_Int("SpawnZ"): Z coordinate of the player's spawn position. Default is 0.
|
||||
* * TAG_Byte("SnowCovered"): 1 enables, 0 disables, see Winter Mode
|
||||
* * TAG_Long("SizeOnDisk"): Estimated size of the entire world in bytes.
|
||||
* * TAG_Long("RandomSeed"): Random number providing the Random Seed for the terrain.
|
||||
* </editor-fold>
|
||||
*/
|
||||
|
||||
//@formatter:on
|
||||
|
||||
final Map<String, Tag> originalData =
|
||||
((CompoundTag) originalTopLevelTag.getValue().get("Data")).getValue();
|
||||
@ -137,5 +141,4 @@ public class SpawnPoint {
|
||||
throw new IOException("Invalid level format.");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,7 +1,17 @@
|
||||
package morlok8k.MinecraftLandGenerator;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class StringArrayParse {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param array
|
||||
* @param ParseOut
|
||||
* @return
|
||||
*/
|
||||
public static String[] Parse(final String[] array, final String ParseOut) {
|
||||
|
||||
//There is probably a better way to do this.
|
||||
@ -44,5 +54,4 @@ public class StringArrayParse {
|
||||
return array; //no changes have been done, return the original array
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,9 @@
|
||||
package morlok8k.MinecraftLandGenerator;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class Time {
|
||||
|
||||
/**
|
||||
@ -68,6 +72,7 @@ public class Time {
|
||||
/**
|
||||
* waits ten seconds. outputs 10%, 20%, etc after each second.
|
||||
*
|
||||
* @param output
|
||||
* @author Morlok8k
|
||||
*/
|
||||
public static void waitTenSec(final boolean output) {
|
||||
@ -97,5 +102,4 @@ public class Time {
|
||||
return;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -16,6 +16,10 @@ import java.util.Iterator;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class Update {
|
||||
|
||||
/**
|
||||
@ -29,6 +33,7 @@ public class Update {
|
||||
* <br>
|
||||
* This saves the hash and the timestamp (now known as the BuildID)
|
||||
*
|
||||
* @param downloadOnly
|
||||
* @author Morlok8k
|
||||
*/
|
||||
public static void buildID(final boolean downloadOnly) {
|
||||
@ -140,6 +145,9 @@ public class Update {
|
||||
/**
|
||||
* This gets the filename of a .jar (typically this one!)
|
||||
*
|
||||
* @param classFile
|
||||
* @return
|
||||
* @throws IOException
|
||||
* @author Morlok8k
|
||||
*/
|
||||
public static String getClassLoader(final Class<?> classFile) throws IOException {
|
||||
@ -182,6 +190,9 @@ public class Update {
|
||||
* Thanks to Roedy Green at <br>
|
||||
* <a href="http://mindprod.com/jgloss/compiletimestamp.html">http://mindprod .com/jgloss/compiletimestamp.html</a>
|
||||
*
|
||||
* @param classFile
|
||||
* @return
|
||||
* @throws IOException
|
||||
* @author Morlok8k
|
||||
*/
|
||||
public static Date getCompileTimeStamp(final Class<?> classFile) throws IOException {
|
||||
@ -374,7 +385,7 @@ public class Update {
|
||||
*/
|
||||
public static void updateMLG() {
|
||||
|
||||
buildID(true); //get latest BuildID file.
|
||||
buildID(true); //get latest BuildID file.
|
||||
var.MLG_Last_Modified_Date = null;
|
||||
readBuildID();
|
||||
|
||||
@ -434,7 +445,7 @@ public class Update {
|
||||
* <a href="http://www.java-examples.com/get-crc-32-checksum-zip-entry-example">http://www.java-examples.com/get-crc-32-checksum-zip-entry-example</a>
|
||||
*
|
||||
* @param zipFile
|
||||
* @param timeBuildID
|
||||
* @return
|
||||
* @author Morlok8k
|
||||
*/
|
||||
public static Long ZipGetModificationTime(final String zipFile) {
|
||||
@ -489,5 +500,4 @@ public class Update {
|
||||
return 0L; //return Jan. 1, 1970 12:00 GMT for failures
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -8,11 +8,15 @@ import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class WorldVerify {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
*
|
||||
*/
|
||||
static void verifyWorld() {
|
||||
//TODO: element comment
|
||||
|
||||
@ -85,5 +89,4 @@ public class WorldVerify {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -7,118 +7,308 @@ import java.util.Date;
|
||||
import java.util.Locale;
|
||||
import java.util.Scanner;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class var {
|
||||
|
||||
//
|
||||
// Program Info:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static boolean testing = false; // display more output when debugging
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static boolean verbose = false;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final String PROG_NAME = "Minecraft Land Generator"; // Program Name
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final String VERSION = "1.7.1 test 10"; // Version Number!
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final String AUTHORS = "Corrodias, Morlok8k, pr0f1x"; // Authors
|
||||
|
||||
//
|
||||
// Operating System Info:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final String fileSeparator = System.getProperty("file.separator");
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final String newLine = System.getProperty("line.separator");
|
||||
|
||||
//
|
||||
// Commonly Used Strings:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String MLG = "[MLG] ";
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String MLGe = "[MLG-ERROR] ";
|
||||
|
||||
//
|
||||
// Date & Build-ID stuff:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static DateFormat dateFormat_MDY = new SimpleDateFormat("MMMM d, yyyy", Locale.ENGLISH);
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static Date MLG_Last_Modified_Date = null;
|
||||
public static DateFormat dateFormat = new SimpleDateFormat( // Lets get a nice Date format for display
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static DateFormat dateFormat = new SimpleDateFormat( // Lets get a nice Date format for display
|
||||
"EEEE, MMMM d, yyyy 'at' h:mm a zzzz", Locale.ENGLISH);
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static Date date = null; // date stuff
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static Long MLG_Last_Modified_Long = 0L;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String buildIDFile = "MLG-BuildID";
|
||||
|
||||
//
|
||||
// Filenames:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String MLGFileNameShort = null;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final String MinecraftLandGeneratorConf = "MinecraftLandGenerator.conf";
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final String defaultReadmeFile = "_MLG_Readme.txt";
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final String MLG_JarFile = "MinecraftLandGenerator.jar";
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String MLGFileName = null;
|
||||
|
||||
//
|
||||
// Text Input
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static Scanner sc = new Scanner(System.in);
|
||||
|
||||
//
|
||||
// MinecraftLandGenerator.conf Stuff:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String doneText = null;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String preparingText = null;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String preparingLevel = null;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String level_0 = null; // the world
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String level_1 = null; // the nether
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String level_2 = null; // the end
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String level_3 = null; // future worlds
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String level_4 = null;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String level_5 = null;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String level_6 = null;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String level_7 = null;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String level_8 = null;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String level_9 = null;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final String defaultJavaLine =
|
||||
"java -Djava.awt.headless=true -Djline.terminal=jline.UnsupportedTerminal -Duser.language=en"
|
||||
+ " -Xms1024m -Xmx1024m -Xincgc -jar minecraft_server.jar nogui";
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String serverPath = null;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String worldPath = null;
|
||||
|
||||
//
|
||||
//Server Launching:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static ProcessBuilder minecraft = null;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String javaLine = null;
|
||||
|
||||
//
|
||||
//Server Launching:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String worldName = null;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static boolean waitSave = false;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static boolean ignoreWarnings = false;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static Long randomSeed = (long) 0;
|
||||
|
||||
//
|
||||
// Update URLs:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final String github_URL =
|
||||
"https://raw.github.com/Morlok8k/MinecraftLandGenerator/master/bin/"; // just removing some redundancy
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final String github_MLG_Conf_URL = github_URL + MinecraftLandGeneratorConf;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final String github_MLG_BuildID_URL = github_URL + buildIDFile;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final String github_MLG_jar_URL = github_URL + MLG_JarFile;
|
||||
|
||||
//
|
||||
// Update Stuff:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final Class<?> cls = Main.class;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static final String rsrcError = "rsrcERROR";
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static boolean isCompiledAsJar = false;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String MLG_Current_Hash = null;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static int inf_loop_protect_BuildID = 0;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static boolean flag_downloadedBuildID = false;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static ArrayList<String> timeStamps = new ArrayList<String>();
|
||||
|
||||
//
|
||||
// Resume Data & Log Files
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static int resumeX = 0; //resume data, if needed.
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static int resumeZ = 0;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String[] originalArgs = {};
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static String MC_Server_Version = "";
|
||||
|
||||
//
|
||||
// Misc:
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static boolean webLaunch = true; // Launch website after generation.
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static boolean dontWait = false;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static boolean alternate = false;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static int MinecraftServerChunkPlayerCache = 625; //You see this number when you first launch the server in GUI mode, after the world is loaded, but before anyone has connected.
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static int incrementFull = (int) (Math.sqrt(MinecraftServerChunkPlayerCache) * 16); // 400, the length of a fresh (no players have ever logged in) server map.
|
||||
public static int increment = incrementFull - 16; //public static int increment = 384; // 384, what we use to iterate between sections of the map. Allows for some overlap to prevent "stripes"
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static int increment = incrementFull - 16; //public static int increment = 384; // 384, what we use to iterate between sections of the map. Allows for some overlap to prevent "stripes"
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static boolean assertsEnabled = false; //debugging use... use java -ea -jar MinecraftlandGenerator.jar...
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static long startTime = 0L;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
public static Boolean recheckFlag = false;
|
||||
|
||||
}
|
||||
|
@ -1,5 +1,9 @@
|
||||
package org.w3c.bert_bos.UTF8URL;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author morlok8k
|
||||
*/
|
||||
public class Unescape {
|
||||
|
||||
/* Morlok8k:
|
||||
@ -8,8 +12,8 @@ public class Unescape {
|
||||
* I had to look up many things in it to see how it works, and I still don't quite follow it.
|
||||
* (I have never worked with raw bytes in Java... Never needed to.)
|
||||
* But it works and it works very well. I tip my hat at you Bert!
|
||||
*
|
||||
* I just needed to say this somewhere, even though very few people will ever read this.
|
||||
*
|
||||
* I just needed to say this somewhere, even though very few people will ever read this.
|
||||
*/
|
||||
/**
|
||||
* Created: 17 April 1997<br>
|
||||
@ -28,7 +32,6 @@ public class Unescape {
|
||||
* @return decoded string of URL
|
||||
* @author Bert Bos
|
||||
*/
|
||||
|
||||
public static String unescape(final String s) {
|
||||
final StringBuffer sbuf = new StringBuffer();
|
||||
final int l = s.length();
|
||||
|
Reference in New Issue
Block a user