minor 1.7.0 changes. almost ready!

This commit is contained in:
Morlok8k 2012-08-01 02:29:41 -07:00
parent 3b59258a6e
commit d50178faeb
2 changed files with 205 additions and 171 deletions

View File

@ -5,6 +5,7 @@ import java.io.File;
import java.io.FileNotFoundException; import java.io.FileNotFoundException;
import java.io.FileReader; import java.io.FileReader;
import java.io.IOException; import java.io.IOException;
import java.net.URI;
import java.security.NoSuchAlgorithmException; import java.security.NoSuchAlgorithmException;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
@ -36,7 +37,7 @@ import morlok8k.minecraft.landgenerator.MLG_input_CLI;
*/ */
public class Main { public class Main {
// //java.awt.Desktop.getDesktop().browse(splashPage);
// //
// Public Vars: // Public Vars:
public static boolean testing = false; // display more output when debugging public static boolean testing = false; // display more output when debugging
@ -138,6 +139,7 @@ public class Main {
private static Boolean recheckFlag = false; private static Boolean recheckFlag = false;
private static long startTime = 0L; private static long startTime = 0L;
private static boolean webLaunch = true; // Launch website after generation.
private static boolean assertsEnabled = false; //debugging use... use java -ea -jar MinecraftlandGenerator.jar... private static boolean assertsEnabled = false; //debugging use... use java -ea -jar MinecraftlandGenerator.jar...
@ -781,6 +783,31 @@ public class Main {
out("Generation complete in: " out("Generation complete in: "
+ MLG_Time.displayTime(startTime, System.currentTimeMillis())); + MLG_Time.displayTime(startTime, System.currentTimeMillis()));
MLG_Time.waitTenSec(false); MLG_Time.waitTenSec(false);
//TODO: add if's
if (webLaunch) { //if webLaunch is already false, don't check for these things
if (java.awt.GraphicsEnvironment.isHeadless()) {
webLaunch = false; //headless enviroment - cant bring up webpage!
}
File web1 = new File("web");
File web2 = new File("web.txt"); //user has put in the magical file to not launch the webpage
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"
webLaunch = false;
}
}
if (webLaunch && java.awt.Desktop.isDesktopSupported()) {
URI splashPage =
URI.create("https://sites.google.com/site/minecraftlandgenerator/home/mlg_splash");
try {
java.awt.Desktop.getDesktop().browse(splashPage);
} catch (IOException e) {
err("Error displaying webpage... " + e.getLocalizedMessage());
}
}
} catch (IOException ex) { } catch (IOException ex) {
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, ex.getMessage(), ex); Logger.getLogger(Main.class.getName()).log(Level.SEVERE, ex.getMessage(), ex);
} }

View File

@ -27,10 +27,10 @@ public class MLG_Readme_and_HelpInfo {
String VERSION = Main.VERSION; String VERSION = Main.VERSION;
String showHelpSTR = ""; String showHelpSTR = "";
showHelpSTR = showHelp(false); //stored as a string for easier manipulation in the future String ReadMeText = "";
String VersionInfo = "";
//@formatter:off //@formatter:off
String ReadMeText = "";
ReadMeText = PROG_NAME + " version " + VERSION + newLine ReadMeText = PROG_NAME + " version " + VERSION + newLine
+ newLine + newLine
+ "Updated " + MLG_Last_Modified_MDY + newLine + "Updated " + MLG_Last_Modified_MDY + newLine
@ -58,6 +58,14 @@ public class MLG_Readme_and_HelpInfo {
+ newLine + newLine
+ "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." + "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."
+ newLine + newLine
+ "-----------------------------------------------" + newLine
+ newLine;
//@formatter:on
showHelpSTR = showHelp(false); //stored as a string for easier manipulation in the future
//@formatter:off
VersionInfo = newLine
+ "-----------------------------------------------" + newLine + "-----------------------------------------------" + newLine
+ newLine + newLine
+ "Version History:" + newLine + "Version History:" + newLine
@ -65,9 +73,11 @@ public class MLG_Readme_and_HelpInfo {
+ "1.7.0" + newLine + "1.7.0" + newLine
+ "- Major Code Optimization" + newLine + "- Major Code Optimization" + newLine
+ "- Drastically reduced the amount of time it takes for MLG to expand a world after it has already done so before!" + newLine + "- Drastically reduced the amount of time it takes for MLG to expand a world after it has already done so before!" + newLine
+ "- (To do this, I needed to rewrite the Main loop of the program, and add my own Coordinate object)" + newLine + " (To do this, I needed to rewrite the Main loop of the program, and add my own Coordinate object)" + newLine
+ "- Added Resume Functionality" + newLine
+ "- Updated Time Output yet again." + newLine + "- Updated Time Output yet again." + newLine
+ "- Misc. Tweaks." + newLine + "- Misc. Tweaks." + newLine
+ "- Misc. Additions" + newLine
+ "1.6.3" + newLine + "1.6.3" + newLine
+ "- Minor Code Optimization" + newLine + "- Minor Code Optimization" + newLine
+ "- Finely got on the ball and added the JNBT source and everything (as an internal .zip) to be completely faithful to his license" + newLine + "- Finely got on the ball and added the JNBT source and everything (as an internal .zip) to be completely faithful to his license" + newLine
@ -195,13 +205,10 @@ public class MLG_Readme_and_HelpInfo {
+ "Notes:" + newLine + "Notes:" + newLine
+ "Due to changes in server beta 1.6, it now generates the nether as well as the world at the same time." + newLine + "Due to changes in server beta 1.6, it now generates the nether as well as the world at the same time." + newLine
+ "However, Since beta 1.9 and Minecraft 1.0, the nether or the end is no longer generated." + "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." + newLine + "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." + newLine;
+ newLine
+ "-----------------------------------------------" + newLine
+ newLine;
//@formatter:on //@formatter:on
MLG_FileWrite.writeTxtFile(readmeFile, ReadMeText + showHelpSTR); MLG_FileWrite.writeTxtFile(readmeFile, ReadMeText + showHelpSTR + VersionInfo);
} }