1.7.0 almost done
This commit is contained in:
parent
cdf14f9f4f
commit
fc3a2121b9
@ -32,6 +32,7 @@ public class MLG_Server {
|
||||
Main.out("Alternate Launch");
|
||||
Process process = Main.minecraft.start();
|
||||
|
||||
//byte[] saveAll = { 's', 'a', 'v', 'e', '-', 'a', 'l', 'l', '\r', '\n' };
|
||||
byte[] stop = { 's', 't', 'o', 'p', '\r', '\n' };
|
||||
|
||||
// monitor output and print to console where required.
|
||||
@ -39,9 +40,7 @@ public class MLG_Server {
|
||||
BufferedReader pOut =
|
||||
new BufferedReader(new InputStreamReader(process.getInputStream()));
|
||||
String line;
|
||||
while ((line = pOut.readLine()) != null) { // readLine() returns null when the process exits
|
||||
|
||||
line = line.trim(); //Trim spaces off the beginning and end, if any.
|
||||
while ((line = pOut.readLine().trim()) != null) { // readLine() returns null when the process exits
|
||||
|
||||
System.out.println(line);
|
||||
if (line.contains(Main.doneText)) { // EDITED By Morlok8k for Minecraft 1.3+ Beta
|
||||
@ -82,9 +81,9 @@ public class MLG_Server {
|
||||
|
||||
boolean convertedMapFormattingFlag = false; // This allows MLG to track if we converted a map to a new format (such as Chunk-file -> McRegion, or McRegion -> Anvil)
|
||||
// just so it gets a line ending after the % output finishes
|
||||
while ((line = pOut.readLine()) != null) { // readLine() returns null when the process exits
|
||||
while ((line = pOut.readLine().trim()) != null) { // readLine() returns null when the process exits
|
||||
|
||||
int posBracket = line.lastIndexOf("]");
|
||||
int posBracket = line.indexOf("]"); //changed from .lastIndexOf to .indexOf, in case we have a custom server that outputs something with an "]". we want the first one anyways.
|
||||
if (posBracket != -1) {
|
||||
shortLine = line.substring(posBracket + 2);
|
||||
shortLine = shortLine.trim();
|
||||
@ -92,8 +91,6 @@ public class MLG_Server {
|
||||
shortLine = line;
|
||||
}
|
||||
|
||||
line = line.trim();
|
||||
|
||||
if (Main.verbose) {
|
||||
Main.outS(shortLine);
|
||||
//} else if (line.toLowerCase().contains("saving")) { //this was just clutter
|
||||
|
@ -139,7 +139,7 @@ public class Main {
|
||||
|
||||
private static Boolean recheckFlag = false;
|
||||
private static long startTime = 0L;
|
||||
private static boolean webLaunch = true; // Launch website after generation.
|
||||
public static boolean webLaunch = true; // Launch website after generation.
|
||||
|
||||
private static boolean assertsEnabled = false; //debugging use... use java -ea -jar MinecraftlandGenerator.jar...
|
||||
|
||||
@ -800,12 +800,17 @@ public class Main {
|
||||
|
||||
if (webLaunch && java.awt.Desktop.isDesktopSupported()) {
|
||||
URI splashPage =
|
||||
URI.create("https://sites.google.com/site/minecraftlandgenerator/home/mlg_splash");
|
||||
//URI.create("https://sites.google.com/site/minecraftlandgenerator/home/mlg_splash");
|
||||
URI.create("http://adf.ly/520855/splashbanner");
|
||||
try {
|
||||
java.awt.Desktop.getDesktop().browse(splashPage);
|
||||
} catch (IOException e) {
|
||||
err("Error displaying webpage... " + e.getLocalizedMessage());
|
||||
}
|
||||
} else {
|
||||
out("Please Visit: http://adf.ly/520855/mlg");
|
||||
out("Or: https://sites.google.com/site/minecraftlandgenerator/");
|
||||
out("Thanks!");
|
||||
}
|
||||
|
||||
} catch (IOException ex) {
|
||||
|
@ -144,6 +144,12 @@ public class MLG_FileRead {
|
||||
} else {
|
||||
Main.waitSave = false;
|
||||
}
|
||||
} else if (property.equals("weblaunch")) {
|
||||
if (value.toLowerCase().equals("true")) {
|
||||
Main.webLaunch = true;
|
||||
} else {
|
||||
Main.webLaunch = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -167,6 +173,7 @@ public class MLG_FileRead {
|
||||
Main.outD(" level_8: " + Main.level_8);
|
||||
Main.outD(" level_9: " + Main.level_9);
|
||||
Main.outD(" waitSave: " + Main.waitSave);
|
||||
Main.outD(" webLaunch: " + Main.webLaunch);
|
||||
}
|
||||
} catch (FileNotFoundException ex) {
|
||||
Main.out("Could not find "
|
||||
|
@ -111,7 +111,9 @@ public class MLG_FileWrite {
|
||||
+ "Level-8=Level 8 (Future Level)" + Main.newLine
|
||||
+ "Level-9=Level 9 (Future Level)" + Main.newLine
|
||||
+ Main.newLine
|
||||
+ "#Optional: Wait a few seconds after saving." + Main.newLine + "WaitSave=false";
|
||||
+ "#Optional: Wait a few seconds after saving." + Main.newLine
|
||||
+ "WaitSave=false" + Main.newLine
|
||||
+ "webLaunch=true";
|
||||
//@formatter:on
|
||||
|
||||
writeTxtFile(Main.MinecraftLandGeneratorConf, txt);
|
||||
|
@ -76,7 +76,8 @@ public class MLG_Readme_and_HelpInfo {
|
||||
+ " (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
|
||||
+ "- Made xx% output nicer by rewriting previous existing line." + newLine
|
||||
+ "- Misc. Tweaks" + newLine
|
||||
+ "- Misc. Additions" + newLine
|
||||
+ "1.6.3" + newLine
|
||||
+ "- Minor Code Optimization" + newLine
|
||||
|
Reference in New Issue
Block a user