1.6.0. (test16)
This commit is contained in:
parent
98d0e3f219
commit
1c49b7ead2
9
README
9
README
@ -1,4 +1,4 @@
|
|||||||
Minecraft Land Generator version 1.6.0 Testing 12
|
Minecraft Land Generator version 1.6.0 Testing 16
|
||||||
|
|
||||||
Updated November 4, 2011
|
Updated November 4, 2011
|
||||||
|
|
||||||
@ -24,11 +24,11 @@ Version History:
|
|||||||
Morlok8k:
|
Morlok8k:
|
||||||
|
|
||||||
1.6.0
|
1.6.0
|
||||||
- TODO: add features
|
|
||||||
- Added the ability to download files from the internet (specifically for the BuildID file, and conf file)
|
- Added the ability to download files from the internet (specifically for the BuildID file, and conf file)
|
||||||
- Added the ability to check what version the .jar is. (Using MD5 hashes, timestamps, and the BuildID file)
|
- Added the ability to check what version the .jar is. (Using MD5 hashes, timestamps, and the BuildID file)
|
||||||
- Some Refactoring
|
- COde Refactoring
|
||||||
- Code Formatting
|
- Code Formatting
|
||||||
|
- Code Optimization
|
||||||
|
|
||||||
1.5.1
|
1.5.1
|
||||||
- pr0f1x: Added the "save-all" command to be sent to the server before shutting it down.
|
- pr0f1x: Added the "save-all" command to be sent to the server before shutting it down.
|
||||||
@ -130,7 +130,8 @@ Other options:
|
|||||||
Outputs the current world's spawn point coordinates.
|
Outputs the current world's spawn point coordinates.
|
||||||
|
|
||||||
java -jar MinecraftLandGenerator.jar -conf
|
java -jar MinecraftLandGenerator.jar -conf
|
||||||
Generates a MinecraftLandGenerator.conf file.
|
java -jar MinecraftLandGenerator.jar -conf download
|
||||||
|
Generates or downloads a MinecraftLandGenerator.conf file.
|
||||||
|
|
||||||
java -jar MinecraftLandGenerator.jar -readme readme.txt
|
java -jar MinecraftLandGenerator.jar -readme readme.txt
|
||||||
java -jar MinecraftLandGenerator.jar -readme
|
java -jar MinecraftLandGenerator.jar -readme
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
919315DC465C9A821A857FCBE789C571=1320395554000#MLG v1.6.0 Testing 8
|
919315DC465C9A821A857FCBE789C571=1320395554000#MLG v1.6.0 Testing 8
|
||||||
293A184EB26A62AE6D64CEB01BAD9537=1320399076000#MLG v1.6.0 Testing 11
|
293A184EB26A62AE6D64CEB01BAD9537=1320399076000#MLG v1.6.0 Testing 11
|
||||||
4F00853101546B5C030F5D89036EC574=1320402115000#MLG v1.6.0 Testing 12
|
4F00853101546B5C030F5D89036EC574=1320402115000#MLG v1.6.0 Testing 12
|
||||||
|
E77F9F6977FA5BE75D81CA8E3584DCF8=1320404362000#MLG v1.6.0 Testing 16
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
#Minecraft Land Generator Configuration File: Version: 1.6.0 Testing 8
|
#Minecraft Land Generator Configuration File: Version: 1.6.0 Testing 16
|
||||||
#Authors: Corrodias, Morlok8k, pr0f1x
|
#Authors: Corrodias, Morlok8k, pr0f1x
|
||||||
#Auto-Generated: Friday, November 4, 2011 at 1:53 AM Pacific Daylight Time
|
#Auto-Generated: Friday, November 4, 2011 at 3:59 AM Pacific Daylight Time
|
||||||
|
|
||||||
#Line to run server:
|
#Line to run server:
|
||||||
Java=java -Djava.awt.headless=true -Djline.terminal=jline.UnsupportedTerminal -Duser.language=en -Xms1024m -Xmx1024m -Xincgc -jar minecraft_server.jar nogui
|
Java=java -Djava.awt.headless=true -Djline.terminal=jline.UnsupportedTerminal -Duser.language=en -Xms1024m -Xmx1024m -Xincgc -jar minecraft_server.jar nogui
|
||||||
|
Binary file not shown.
@ -45,7 +45,7 @@ import org.jnbt.Tag;
|
|||||||
public class Main {
|
public class Main {
|
||||||
|
|
||||||
// Version Number!
|
// Version Number!
|
||||||
private static final String VERSION = "1.6.0 Testing 12";
|
private static final String VERSION = "1.6.0 Testing 16";
|
||||||
private static final String AUTHORS = "Corrodias, Morlok8k, pr0f1x";
|
private static final String AUTHORS = "Corrodias, Morlok8k, pr0f1x";
|
||||||
|
|
||||||
private static final String fileSeparator = System.getProperty("file.separator");
|
private static final String fileSeparator = System.getProperty("file.separator");
|
||||||
@ -97,16 +97,20 @@ public class Main {
|
|||||||
private static String buildIDFile = "MLG-BuildID";
|
private static String buildIDFile = "MLG-BuildID";
|
||||||
private static boolean isCompiledAsJar = false;
|
private static boolean isCompiledAsJar = false;
|
||||||
private static String MLG_Current_Hash = null;
|
private static String MLG_Current_Hash = null;
|
||||||
|
private static int inf_loop_protect_BuildID = 0;
|
||||||
|
|
||||||
private static final String github_MLG_Conf_URL =
|
private static final String github_MLG_Conf_URL =
|
||||||
"https://raw.github.com/Morlok8k/MinecraftLandGenerator/master/bin/MinecraftLandGenerator.conf";
|
"https://raw.github.com/Morlok8k/MinecraftLandGenerator/master/bin/MinecraftLandGenerator.conf";
|
||||||
private static final String github_MLG_BuildID_URL =
|
private static final String github_MLG_BuildID_URL =
|
||||||
"https://raw.github.com/Morlok8k/MinecraftLandGenerator/master/bin/MLG-BuildID";
|
"https://raw.github.com/Morlok8k/MinecraftLandGenerator/master/bin/MLG-BuildID";
|
||||||
|
|
||||||
private static final String MinecraftLandGeneratorConf = "MinecraftLandGenerator.conf";
|
private static final String MinecraftLandGeneratorConf = "MinecraftLandGenerator.conf";
|
||||||
|
|
||||||
|
//////
|
||||||
|
|
||||||
private static final boolean testing = false; // a constant to display more output when debugging
|
private static final boolean testing = false; // a constant to display more output when debugging
|
||||||
|
|
||||||
|
//////
|
||||||
|
|
||||||
// REMINDER: because I always forget/mix up languages:
|
// REMINDER: because I always forget/mix up languages:
|
||||||
// "static" in java means "global"
|
// "static" in java means "global"
|
||||||
// "final" means "constant"
|
// "final" means "constant"
|
||||||
@ -124,6 +128,7 @@ public class Main {
|
|||||||
*
|
*
|
||||||
* @author Corrodias, Morlok8k
|
* @author Corrodias, Morlok8k
|
||||||
* @param args
|
* @param args
|
||||||
|
*
|
||||||
*/
|
*/
|
||||||
private void run(String[] args) {
|
private void run(String[] args) {
|
||||||
|
|
||||||
@ -168,10 +173,12 @@ public class Main {
|
|||||||
// the arguments are apparently okay so far. parse the conf file.
|
// the arguments are apparently okay so far. parse the conf file.
|
||||||
if (args[0].equalsIgnoreCase("-conf")) {
|
if (args[0].equalsIgnoreCase("-conf")) {
|
||||||
|
|
||||||
boolean fileSuccess = downloadFile(github_MLG_Conf_URL);
|
if (args[0].equalsIgnoreCase("download")) {
|
||||||
if (fileSuccess) {
|
boolean fileSuccess = downloadFile(github_MLG_Conf_URL);
|
||||||
System.out.println(MLG + MinecraftLandGeneratorConf + " file downloaded.");
|
if (fileSuccess) {
|
||||||
return;
|
System.out.println(MLG + MinecraftLandGeneratorConf + " file downloaded.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@ -1195,11 +1202,11 @@ public class Main {
|
|||||||
+ "Morlok8k:" + newLine
|
+ "Morlok8k:" + newLine
|
||||||
+ newLine
|
+ newLine
|
||||||
+ "1.6.0" + newLine
|
+ "1.6.0" + newLine
|
||||||
+ "- TODO: add features" + newLine //TODO
|
|
||||||
+ "- Added the ability to download files from the internet (specifically for the BuildID file, and conf file)" + newLine
|
+ "- Added the ability to download files from the internet (specifically for the BuildID file, and conf file)" + newLine
|
||||||
+ "- Added the ability to check what version the .jar is. (Using MD5 hashes, timestamps, and the BuildID file)" + newLine
|
+ "- Added the ability to check what version the .jar is. (Using MD5 hashes, timestamps, and the BuildID file)" + newLine
|
||||||
+ "- Some Refactoring" + newLine
|
+ "- COde Refactoring" + newLine
|
||||||
+ "- Code Formatting" + newLine
|
+ "- Code Formatting" + newLine
|
||||||
|
+ "- Code Optimization" + newLine
|
||||||
+ newLine
|
+ newLine
|
||||||
+ "1.5.1" + newLine
|
+ "1.5.1" + newLine
|
||||||
+ "- pr0f1x: Added the \"save-all\" command to be sent to the server before shutting it down." + newLine
|
+ "- pr0f1x: Added the \"save-all\" command to be sent to the server before shutting it down." + newLine
|
||||||
@ -1382,20 +1389,15 @@ public class Main {
|
|||||||
*/
|
*/
|
||||||
public static void buildID() {
|
public static void buildID() {
|
||||||
|
|
||||||
// TODO: Decide to download BuildID from Github.
|
// download BuildID from Github.
|
||||||
|
|
||||||
boolean fileSuccess = downloadFile(github_MLG_BuildID_URL);
|
boolean fileSuccess = downloadFile(github_MLG_BuildID_URL);
|
||||||
if (fileSuccess) {
|
if (fileSuccess) {
|
||||||
System.out.println(MLG + buildIDFile + " file downloaded.");
|
System.out.println(MLG + buildIDFile + " file downloaded.");
|
||||||
}
|
|
||||||
|
|
||||||
|
}
|
||||||
// If not available, create.
|
// If not available, create.
|
||||||
// After downloading, check to see if it matches hash.
|
// After downloading, check to see if it matches hash.
|
||||||
|
|
||||||
// example:
|
|
||||||
// downloadFile(MinecraftLandGeneratorConfURL);
|
|
||||||
// downloadFile("https://raw.github.com/Morlok8k/MinecraftLandGenerator/master/bin/" + buildIDFile);
|
|
||||||
|
|
||||||
if (MLGFileName == null) {
|
if (MLGFileName == null) {
|
||||||
try {
|
try {
|
||||||
MLGFileName = getClassLoader(cls);
|
MLGFileName = getClassLoader(cls);
|
||||||
@ -1488,6 +1490,12 @@ public class Main {
|
|||||||
*/
|
*/
|
||||||
private void readBuildID() {
|
private void readBuildID() {
|
||||||
|
|
||||||
|
if (inf_loop_protect_BuildID > 10) {
|
||||||
|
MLG_Last_Modified_Date = new Date(new Long(0)); //set the day to Jan 1, 1970 for failure
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
inf_loop_protect_BuildID++; // this is to prevent an infinite loop (however unlikely)
|
||||||
|
|
||||||
if (MLGFileName == null) {
|
if (MLGFileName == null) {
|
||||||
try {
|
try {
|
||||||
MLGFileName = getClassLoader(cls);
|
MLGFileName = getClassLoader(cls);
|
||||||
@ -1548,7 +1556,6 @@ public class Main {
|
|||||||
// System.out.println("[DEBUG] FoundLine False");
|
// System.out.println("[DEBUG] FoundLine False");
|
||||||
buildID();
|
buildID();
|
||||||
readBuildID(); // yes I'm calling the function from itself. potential infinite loop? possibly. I haven't encountered it yet!
|
readBuildID(); // yes I'm calling the function from itself. potential infinite loop? possibly. I haven't encountered it yet!
|
||||||
// TODO: Add safeguard to prevent Infinite Loops
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
@ -1556,7 +1563,6 @@ public class Main {
|
|||||||
// e.printStackTrace();
|
// e.printStackTrace();
|
||||||
buildID();
|
buildID();
|
||||||
readBuildID();
|
readBuildID();
|
||||||
// TODO: Add safeguard to prevent Infinite Loops
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1700,7 +1706,8 @@ public class Main {
|
|||||||
+ " Outputs the current world's spawn point coordinates." + newLine
|
+ " Outputs the current world's spawn point coordinates." + newLine
|
||||||
+ newLine
|
+ newLine
|
||||||
+ " java -jar MinecraftLandGenerator.jar -conf" + newLine
|
+ " java -jar MinecraftLandGenerator.jar -conf" + newLine
|
||||||
+ " Generates a "+ MinecraftLandGeneratorConf + " file." + newLine
|
+ " java -jar MinecraftLandGenerator.jar -conf download" + newLine
|
||||||
|
+ " Generates or downloads a "+ MinecraftLandGeneratorConf + " file." + newLine
|
||||||
+ newLine
|
+ newLine
|
||||||
+ " java -jar MinecraftLandGenerator.jar -readme readme.txt" + newLine
|
+ " java -jar MinecraftLandGenerator.jar -readme readme.txt" + newLine
|
||||||
+ " java -jar MinecraftLandGenerator.jar -readme" + newLine
|
+ " java -jar MinecraftLandGenerator.jar -readme" + newLine
|
||||||
|
Reference in New Issue
Block a user