minor 1.7.0 changes. almost ready!
This commit is contained in:
parent
3b59258a6e
commit
d50178faeb
@ -5,6 +5,7 @@ import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
import java.security.NoSuchAlgorithmException;
|
||||
import java.text.DateFormat;
|
||||
import java.text.SimpleDateFormat;
|
||||
@ -36,7 +37,7 @@ import morlok8k.minecraft.landgenerator.MLG_input_CLI;
|
||||
*/
|
||||
public class Main {
|
||||
|
||||
//
|
||||
//java.awt.Desktop.getDesktop().browse(splashPage);
|
||||
//
|
||||
// Public Vars:
|
||||
public static boolean testing = false; // display more output when debugging
|
||||
@ -138,6 +139,7 @@ public class Main {
|
||||
|
||||
private static Boolean recheckFlag = false;
|
||||
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...
|
||||
|
||||
@ -781,6 +783,31 @@ public class Main {
|
||||
out("Generation complete in: "
|
||||
+ MLG_Time.displayTime(startTime, System.currentTimeMillis()));
|
||||
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) {
|
||||
Logger.getLogger(Main.class.getName()).log(Level.SEVERE, ex.getMessage(), ex);
|
||||
}
|
||||
|
@ -27,10 +27,10 @@ public class MLG_Readme_and_HelpInfo {
|
||||
String VERSION = Main.VERSION;
|
||||
|
||||
String showHelpSTR = "";
|
||||
showHelpSTR = showHelp(false); //stored as a string for easier manipulation in the future
|
||||
String ReadMeText = "";
|
||||
String VersionInfo = "";
|
||||
|
||||
//@formatter:off
|
||||
String ReadMeText = "";
|
||||
ReadMeText = PROG_NAME + " version " + VERSION + newLine
|
||||
+ newLine
|
||||
+ "Updated " + MLG_Last_Modified_MDY + newLine
|
||||
@ -58,6 +58,14 @@ public class MLG_Readme_and_HelpInfo {
|
||||
+ 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."
|
||||
+ newLine
|
||||
+ "-----------------------------------------------" + newLine
|
||||
+ newLine;
|
||||
//@formatter:on
|
||||
|
||||
showHelpSTR = showHelp(false); //stored as a string for easier manipulation in the future
|
||||
|
||||
//@formatter:off
|
||||
VersionInfo = newLine
|
||||
+ "-----------------------------------------------" + newLine
|
||||
+ newLine
|
||||
+ "Version History:" + newLine
|
||||
@ -65,9 +73,11 @@ public class MLG_Readme_and_HelpInfo {
|
||||
+ "1.7.0" + 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
|
||||
+ "- (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
|
||||
+ "- Misc. Tweaks." + newLine
|
||||
+ "- Misc. Additions" + newLine
|
||||
+ "1.6.3" + 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
|
||||
@ -195,13 +205,10 @@ public class MLG_Readme_and_HelpInfo {
|
||||
+ "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
|
||||
+ "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
|
||||
+ newLine
|
||||
+ "-----------------------------------------------" + newLine
|
||||
+ 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;
|
||||
//@formatter:on
|
||||
|
||||
MLG_FileWrite.writeTxtFile(readmeFile, ReadMeText + showHelpSTR);
|
||||
MLG_FileWrite.writeTxtFile(readmeFile, ReadMeText + showHelpSTR + VersionInfo);
|
||||
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user