diff --git a/.idea/libraries/Maven__commons_io_commons_io_2_6.xml b/.idea/libraries/Maven__commons_io_commons_io_2_6.xml
new file mode 100644
index 0000000..d722698
--- /dev/null
+++ b/.idea/libraries/Maven__commons_io_commons_io_2_6.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__info_picocli_picocli_3_7_0.xml b/.idea/libraries/Maven__info_picocli_picocli_3_7_0.xml
new file mode 100644
index 0000000..66f11ec
--- /dev/null
+++ b/.idea/libraries/Maven__info_picocli_picocli_3_7_0.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/libraries/Maven__org_joml_joml_jdk8_1_9_11.xml b/.idea/libraries/Maven__org_joml_joml_jdk8_1_9_11.xml
new file mode 100644
index 0000000..e41cdbd
--- /dev/null
+++ b/.idea/libraries/Maven__org_joml_joml_jdk8_1_9_11.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 58385b3..34d874c 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -2,12 +2,16 @@
-
-
-
+
+
+
-
+
+
+
+
+
@@ -36,26 +40,26 @@
-
+
-
+
-
+
-
+
@@ -64,37 +68,10 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -102,11 +79,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -114,8 +130,8 @@
-
-
+
+
@@ -138,7 +154,7 @@
-
+
@@ -147,7 +163,7 @@
-
+
@@ -208,11 +224,9 @@
-
-
@@ -221,10 +235,12 @@
-
-
-
+
+
+
+
+
@@ -288,6 +304,7 @@
+
@@ -329,11 +346,21 @@
+
+
+
+
+
+
+
+
+
+
+
-
@@ -462,29 +489,30 @@
-
+
+
-
+
-
-
+
+
-
+
-
+
@@ -667,26 +695,6 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -696,45 +704,18 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@ -747,14 +728,14 @@
-
+
-
+
@@ -762,7 +743,51 @@
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MLG-BuildID b/MLG-BuildID
index 73eed9b..c3b0c8d 100644
--- a/MLG-BuildID
+++ b/MLG-BuildID
@@ -67,5 +67,4 @@ EC40B0ECC52B37571EE65F780994CEDE=1360299846000# MLG v1.7.3
750641846428072595BB3D7657AC8EB1=1373344097000# MLG v1.7.4
2ADFF46BCF1E77A559E6D9DB9C7586E8=1381398906000# MLG v1.7.5
3223FFFEE274215C50C88372D79B9E5C=1421666774000# MLG v1.7.6
-6BAC4CB261A1F7494D7B9802B7462121=1540554341000# MLG v1.7.7 (Class File, Not .Jar)
-0706D1A8BCC148805EDAB29B7549B5A7=1541865384000# MLG v1.7.7 (Class File, Not .Jar)
+72E64BD3C21E559B909A995F38E92C24=1542019123000# MLG v1.7.7 (Class File, Not .Jar)
diff --git a/MinecraftLandGenerator.iml b/MinecraftLandGenerator.iml
index 7bfe03f..4a4638b 100644
--- a/MinecraftLandGenerator.iml
+++ b/MinecraftLandGenerator.iml
@@ -30,8 +30,11 @@
+
+
+
\ No newline at end of file
diff --git a/src/main/java/morlok8k/MinecraftLandGenerator/Coordinates.java b/src/main/java/morlok8k/MinecraftLandGenerator/Coordinates.java
index a6ac751..7b8c086 100644
--- a/src/main/java/morlok8k/MinecraftLandGenerator/Coordinates.java
+++ b/src/main/java/morlok8k/MinecraftLandGenerator/Coordinates.java
@@ -7,9 +7,7 @@
package morlok8k.MinecraftLandGenerator;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-import java.util.regex.*;
+import org.joml.Vector3i;
/**
* Coordinates are in the form of [X,Y,Z] or (X,Z)
@@ -20,26 +18,26 @@ import java.util.regex.*;
* The origin point: When both X and Z are both zero. (elevation is irrelevant)
*/
public class Coordinates {
- //FYI: int's (Integer's) are good enough for Minecraft. They have a range of -2,147,483,648 to 2,147,483,647
- // Minecraft starts failing around (+/-) 12,550,820 and ends at either (+/-) 30,000,000 or (+/-) 32,000,000 (depending on the version).
- // See: http://www.minecraftwiki.net/wiki/Far_Lands for more info.
+/*
- /**
+ */
+/**
* Parses a Coordinates object from a String. Leading and trailing garbage is ignored (FIXME).
- *
- * @param StringOfCoords
- * A short- or long-form coordinate string as described at the two toString() methods
+ *
+ * @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) {
+
+*/
+/* public static Vector3i parseString(String StringOfCoords) {
//parse out string
StringOfCoords = StringOfCoords.trim();
int x = 0, y = 0, z = 0;
- int start = 0, end = 0, firstComma = 0, secComma = 0;
+ int start, end;
String sX = "", sY = "", sZ = "";
boolean shortMode = false, notCoords = false;
@@ -58,116 +56,74 @@ public class Coordinates {
}
if (notCoords) {
- return new Coordinates(0, 0, 0);
+ return new Vector3i(0, 0, 0);
}
+ String[] coords = StringOfCoords.substring(start, end).split(",");
if (shortMode) {
-
- StringOfCoords = StringOfCoords.substring(start, end);
-
- firstComma = StringOfCoords.indexOf(",");
-
- sX = StringOfCoords.substring(start + 1, firstComma);
- sY = "64";
- sZ = StringOfCoords.substring(firstComma + 1, end);
+ return new Vector3i(Integer.valueOf(coords[0]), 64, Integer.valueOf(coords[2]));
+ // sX = StringOfCoords.substring(start + 1, firstComma);
+ // sY = "64";
+ // sZ = StringOfCoords.substring(firstComma + 1, end);
} else {
+ return new Vector3i(Integer.valueOf(coords[0]), Integer.valueOf(coords[1]), Integer.valueOf(coords[2]));
+ // StringOfCoords = StringOfCoords.substring(start, end);
- StringOfCoords = StringOfCoords.substring(start, end);
+ // firstComma = StringOfCoords.indexOf(",");
+ // secComma = StringOfCoords.lastIndexOf(",");
- firstComma = StringOfCoords.indexOf(",");
- secComma = StringOfCoords.lastIndexOf(",");
-
- sX = StringOfCoords.substring(start + 1, firstComma);
- sY = StringOfCoords.substring(firstComma + 1, secComma);
- sZ = StringOfCoords.substring(secComma + 1, end);
+ // sX = StringOfCoords.substring(start + 1, firstComma);
+ // sY = StringOfCoords.substring(firstComma + 1, secComma);
+ // sZ = StringOfCoords.substring(secComma + 1, end);
}
- try {
- x = Integer.parseInt(sX);
- y = Integer.parseInt(sY);
- z = Integer.parseInt(sZ);
- } catch (final NumberFormatException e) {
- return new Coordinates(0, 0, 0);
- }
+ //try {
+ // x = Integer.parseInt(sX);
+ // y = Integer.parseInt(sY);
+ // z = Integer.parseInt(sZ);
+ //} catch (final NumberFormatException e) {
+ // return new Coordinates(0, 0, 0);
+ //}
- return new Coordinates(x, y, z);
+ //return new Coordinates(x, y, z);
}
/**
- * Parses a Coordinates object from a String. Leading and trailing garbage is ignored.
*
- * @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) {
- int X = 0, Y = 0, Z = 0;
- boolean matched = false;
-
- int start = stringOfCoords.indexOf("["), end = stringOfCoords.indexOf("]");
-
- if ((start == -1) || (end == -1)) {
- start = stringOfCoords.indexOf("(");
- end = stringOfCoords.indexOf(")");
- }
-
- if ((start != -1) && (end != -1)) {
- stringOfCoords = stringOfCoords.substring(start, end + 1); // Leading and trailing garbage is ignored
- }
-
- final Matcher shortForm =
- Pattern.compile("\\((-?\\d+),(-?\\d+)\\)").matcher(stringOfCoords);
- final Matcher normalForm =
- Pattern.compile("\\[(-?\\d+),(-?\\d+),(-?\\d+)\\]").matcher(stringOfCoords);
-
- if (shortForm.matches()) {
- X = Integer.parseInt(shortForm.group(1));
- Y = 64;
- Z = Integer.parseInt(shortForm.group(2));
- matched = true;
- }
-
- if (normalForm.matches()) {
- X = Integer.parseInt(normalForm.group(1));
- Y = Integer.parseInt(normalForm.group(2));
- Z = Integer.parseInt(normalForm.group(3));
- matched = true;
- }
-
- if (!matched) {
- System.err.println("Invalid coordinate format: " + stringOfCoords);
- }
- return new Coordinates(X, Y, Z);
- }
+ *//*
+*/
+/* public int X = 0;
/**
- *
- */
- public int X = 0;
- /**
- *
- */
+ *
+ *//*
+
public int Y = 0;
- /**
- *
- */
+ */
+/**
+ *
+ *//*
+
public int Z = 0;
- /**
+ */
+/**
* Someone created a new blank Coordinate! Lets set it to be [0,0,0].
- */
+ *//*
+
public Coordinates() {
clear();
}
- /**
+ */
+/**
* @param x
* @param y
* @param z
- */
+ *//*
+
public Coordinates(final int x, final int y, final int z) {
super();
X = x;
@@ -175,19 +131,23 @@ public class Coordinates {
Z = z;
}
- /**
- *
- */
+ */
+/**
+ *
+ *//*
+
public void clear() {
X = 0;
Y = 0;
Z = 0;
}
- /* (non-Javadoc)
+ */
+/* (non-Javadoc)
* @see java.lang.Object#equals(java.lang.Object)
- */
- @SuppressWarnings({ "unused", "null" })
+ *//*
+
+ @SuppressWarnings({"unused", "null"})
@Override
public boolean equals(final Object obj) {
// I am overriding the inherited equals method.
@@ -196,68 +156,91 @@ public class Coordinates {
// (by default it gets the memory addresses of each object.)
// An object must equal itself
- if (this == obj) { return true; }
+ if (this == obj) {
+ return true;
+ }
// No object equals null
- if (obj == null) { return false; }
- if (this == null) { return false; }
+ if (obj == null) {
+ return false;
+ }
+ if (this == null) {
+ return false;
+ }
// Objects of different types are never equal
- if (getClass() != obj.getClass()) { return false; }
+ if (getClass() != obj.getClass()) {
+ return false;
+ }
// Cast to an Coordinates, then compare the data
final Coordinates c = (Coordinates) obj;
- if (X != c.X) { return false; }
- if (Y != c.Y) { return false; }
- if (Z != c.Z) { return false; }
- return true; // If none of the above returned something, they must be equal!
+ if (X != c.X) {
+ return false;
+ }
+ if (Y != c.Y) {
+ return false;
+ }
+ if (Z != c.Z) {
+ return false;
+ }
+ return true; // If none of the above returned something, they must be equal!
}
- /**
+ */
+/**
* @return the x
- */
+ *//*
+
public int getX() {
return X;
}
- /**
+ */
+/**
* @return the y
- */
+ *//*
+
public int getY() {
return Y;
}
- /**
+ */
+/**
* @return the z
- */
+ *//*
+
public int getZ() {
return Z;
}
- /* (non-Javadoc)
+ */
+/* (non-Javadoc)
* @see java.lang.Object#hashCode()
- */
+ *//*
+
@Override
public int hashCode() {
// I am overriding the inherited hashCode method.
// Because it doesn't know how to deal with my custom data.
// So instead of getting who knows what, we return valid data
- final int prime = 31; // My hard coded prime number
- int result = 1; // The hard coded number I start with
- result = (prime * result) + X; // Add the X data
- result = (prime * result) + Y; // Add the Y data
- result = (prime * result) + Z; // Add the Z data
- return result; //this result will consistently give the same result for the same data.
+ final int prime = 31; // My hard coded prime number
+ int result = 1; // The hard coded number I start with
+ result = (prime * result) + X; // Add the X data
+ result = (prime * result) + Y; // Add the Y data
+ result = (prime * result) + Z; // Add the Z data
+ return result; //this result will consistently give the same result for the same data.
// [0,0,0] will always give 29791. [1,2,3] will always give 30817.
//yes, If I was lazy, I could just do a "return 0;" and it would still be technically valid.
//but if I'm going override the method, I might as well do it right...
}
- /**
- * @param x
- * the x to set
- */
+ */
+/**
+ * @param x the x to set
+ *//*
+
public void setX(final int x) {
X = x;
}
@@ -265,25 +248,30 @@ public class Coordinates {
///////////////////////////////////////////////////////////////////////////////////////
// Java Language Specific Crap Below... Stuff *gotta* be there so Java won't cry... //
///////////////////////////////////////////////////////////////////////////////////////
- /**
- * @param y
- * the y to set
- */
+
+ */
+/**
+ * @param y the y to set
+ *//*
+
public void setY(final int y) {
Y = y;
}
- /**
- * @param z
- * the z to set
- */
+ */
+/**
+ * @param z the z to set
+ *//*
+
public void setZ(final int z) {
Z = z;
}
- /* (non-Javadoc)
+ */
+/* (non-Javadoc)
* @see java.lang.Object#toString()
- */
+ *//*
+
@Override
public String toString() {
// I am overriding the inherited toString method.
@@ -296,21 +284,19 @@ 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)")
+ 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)")
}
- return toString(); // Idiot catch. default to: "[X,Y,Z]"
+ return toString(); // Idiot catch. default to: "[X,Y,Z]"
}
- public static Coordinates parse(String coords){
- String [] splitted = coords.substring(1,coords.length()-2).trim().split(",");
- return null;
- }
+*/
}
diff --git a/src/main/java/morlok8k/MinecraftLandGenerator/FileRead.java b/src/main/java/morlok8k/MinecraftLandGenerator/FileRead.java
index 3e9fc66..eccbeb6 100644
--- a/src/main/java/morlok8k/MinecraftLandGenerator/FileRead.java
+++ b/src/main/java/morlok8k/MinecraftLandGenerator/FileRead.java
@@ -21,6 +21,8 @@ package morlok8k.MinecraftLandGenerator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.joml.Vector3f;
+import org.joml.Vector3i;
import java.io.BufferedReader;
import java.io.File;
@@ -30,23 +32,21 @@ import java.io.IOException;
import java.util.ArrayList;
/**
- *
* @author morlok8k
*/
public class FileRead {
/**
- *
* @param file
* @return
*/
private static Log log = LogFactory.getLog(Main.class);
-
- public static ArrayList readArrayListCoordLog(final String file) {
-
- final ArrayList Return = new ArrayList<>();
+ public static ArrayList readArrayListCoordLog(final String file) {
+
+
+ final ArrayList Return = new ArrayList<>();
try {
final BufferedReader in = new BufferedReader(new FileReader(new File(file)));
@@ -58,21 +58,21 @@ public class FileRead {
int end = line.indexOf('#'); // comments, ignored lines
boolean ignoreLine = false;
- Coordinates c = new Coordinates();
+ Vector3i c;
if (end == -1) { // If we have no hash sign, then we read till the end of the line
end = line.length();
}
- if (end == 0) { //hash is first char, meaning entire line is a comment
+ if (end == 0) { //hash is first char, meaning entire line is a comment
ignoreLine = true;
}
if (!(ignoreLine)) {
- c = Coordinates.parseString(line.substring(0, end));
+ c = parseString(line.substring(0, end));
Return.add(c);
} else {
- if (line.startsWith("##Size:")) { // Potential Resume data.
+ if (line.startsWith("##Size:")) { // Potential Resume data.
int xx = 0;
int zz = 0;
@@ -100,8 +100,8 @@ public class FileRead {
}
/**
- *
- */
+ *
+ */
public static void readConf() {
//TODO: element comment
//String errorMsg = "";
@@ -127,7 +127,7 @@ public class FileRead {
pos = -1;
}
- if (end == 0) { //hash is first char, meaning entire line is a comment
+ if (end == 0) { //hash is first char, meaning entire line is a comment
end = line.length();
pos = 0;
}
@@ -218,4 +218,27 @@ public class FileRead {
return;
}
}
+
+ public static Vector3i parseString(String StringOfCoords) {
+ StringOfCoords = StringOfCoords.trim();
+
+ int start = StringOfCoords.indexOf("[");
+ int end = StringOfCoords.indexOf("]");
+
+ String[] coordlong = StringOfCoords.substring(start, end).split(",");
+ if ((start == -1) || (end == -1)) {
+
+ start = StringOfCoords.indexOf("(");
+ end = StringOfCoords.indexOf(")");
+ String[] coordshort = StringOfCoords.substring(start, end).split(",");
+ if ((start != -1) && (end != -1)) {
+ return new Vector3i(Integer.valueOf(coordshort[0]), 64, Integer.valueOf(coordshort[2]));
+ } else {
+ return new Vector3i(0, 0, 0);
+ }
+ } else {
+
+ return new Vector3i(Integer.valueOf(coordlong[0]), Integer.valueOf(coordlong[1]), Integer.valueOf(coordlong[2]));
+ }
+ }
}
diff --git a/src/main/java/morlok8k/MinecraftLandGenerator/Main.java b/src/main/java/morlok8k/MinecraftLandGenerator/Main.java
index 253d936..ee8c344 100644
--- a/src/main/java/morlok8k/MinecraftLandGenerator/Main.java
+++ b/src/main/java/morlok8k/MinecraftLandGenerator/Main.java
@@ -36,6 +36,7 @@ import java.util.logging.Logger;
import morlok8k.MinecraftLandGenerator.GUI.MLG_GUI;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.joml.Vector3i;
/**
@@ -206,7 +207,7 @@ public class Main {
log.info("Backing up level.dat to level_backup.dat.\n");
Misc.copyFile(serverLevel, backupLevel);
- final Coordinates spawn = SpawnPoint.getSpawn(serverLevel);
+ final Vector3i spawn = SpawnPoint.getSpawn(serverLevel);
log.info("Spawn point detected: [X,Y,Z] " + spawn);
FileWrite.AppendTxtFile(var.worldPath + var.fileSeparator + var.logFile, "# Seed: "
@@ -214,12 +215,12 @@ public class Main {
boolean overridden = false;
if (var.xOffset == null) {
- var.xOffset = spawn.getX();
+ var.xOffset = spawn.x;
} else {
overridden = true;
}
if (var.zOffset == null) {
- var.zOffset = spawn.getZ();
+ var.zOffset = spawn.z;
} else {
overridden = true;
}
@@ -352,7 +353,7 @@ public class Main {
Long timeTracking;
- ArrayList launchList = new ArrayList<>(0);
+ ArrayList launchList = new ArrayList<>(0);
try {
launchList = new ArrayList<>((int) totalIterations);
} catch (Exception e1) {
@@ -405,8 +406,8 @@ public class Main {
}
// add Coordinates to arraylist here
- final Coordinates tempCoords =
- new Coordinates((int) currentX + var.xOffset, 64, (int) currentZ
+ final Vector3i tempCoords =
+ new Vector3i((int) currentX + var.xOffset, 64, (int) currentZ
+ var.zOffset);
launchList.add(tempCoords);
@@ -448,7 +449,7 @@ public class Main {
+ pD + "% Done)");
//get existing list, and remove this list from launchList
- final ArrayList removeList =
+ final ArrayList removeList =
FileRead.readArrayListCoordLog(var.worldPath + var.fileSeparator + var.logFile);
log.info("Removing known generated areas...");
@@ -462,8 +463,8 @@ public class Main {
currentIteration = 0;
totalIterations = launchList.size();
- Coordinates xyz = null;
- final Iterator coordArrayIterator = launchList.iterator();
+ Vector3i xyz = null;
+ final Iterator coordArrayIterator = launchList.iterator();
while (coordArrayIterator.hasNext()) {
currentIteration++;
xyz = coordArrayIterator.next();
diff --git a/src/main/java/morlok8k/MinecraftLandGenerator/Misc.java b/src/main/java/morlok8k/MinecraftLandGenerator/Misc.java
index 5dccddc..8731a3a 100644
--- a/src/main/java/morlok8k/MinecraftLandGenerator/Misc.java
+++ b/src/main/java/morlok8k/MinecraftLandGenerator/Misc.java
@@ -21,6 +21,7 @@ package morlok8k.MinecraftLandGenerator;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.joml.Vector3i;
import java.io.File;
import java.io.FileInputStream;
@@ -83,7 +84,7 @@ public class Misc {
}
final File level = new File(var.worldPath + var.fileSeparator + "level.dat");
try {
- final Coordinates spawn = SpawnPoint.getSpawn(level);
+ final Vector3i spawn = SpawnPoint.getSpawn(level);
log.info("The current spawn point is: [X,Y,Z] " + spawn);
return true;
} catch (final IOException ex) {
diff --git a/src/main/java/morlok8k/MinecraftLandGenerator/SpawnPoint.java b/src/main/java/morlok8k/MinecraftLandGenerator/SpawnPoint.java
index cb9a503..eeacafc 100644
--- a/src/main/java/morlok8k/MinecraftLandGenerator/SpawnPoint.java
+++ b/src/main/java/morlok8k/MinecraftLandGenerator/SpawnPoint.java
@@ -33,6 +33,7 @@ import org.jnbt.LongTag;
import org.jnbt.NBTInputStream;
import org.jnbt.NBTOutputStream;
import org.jnbt.Tag;
+import org.joml.Vector3i;
/**
*
@@ -47,7 +48,7 @@ public class SpawnPoint {
* @throws IOException
* @author Corrodias
*/
- protected static Coordinates getSpawn(final File level) throws IOException {
+ protected static Vector3i getSpawn(final File level) throws IOException {
try {
final NBTInputStream input = new NBTInputStream(new FileInputStream(level));
final CompoundTag originalTopLevelTag = (CompoundTag) input.readTag();
@@ -68,8 +69,8 @@ public class SpawnPoint {
var.randomSeed = Seed.getValue();
System.out.println("Seed: " + var.randomSeed); // lets output the seed, cause why not?
- final Coordinates ret =
- new Coordinates(spawnX.getValue(), spawnY.getValue(), spawnZ.getValue());
+ final Vector3i ret =
+ new Vector3i(spawnX.getValue(), spawnY.getValue(), spawnZ.getValue());
return ret;
} catch (final ClassCastException ex) {
throw new IOException("Invalid level format.");
@@ -91,7 +92,7 @@ public class SpawnPoint {
* if there are any problems reading/writing the file
* @author Corrodias
*/
- protected static void setSpawn(final File level, final Coordinates xyz) throws IOException {
+ protected static void setSpawn(final File level, final Vector3i xyz) throws IOException {
try {
final NBTInputStream input = new NBTInputStream(new FileInputStream(level));
@@ -141,9 +142,9 @@ public class SpawnPoint {
@SuppressWarnings("unused")
final IntTag spawnZ = (IntTag) newData.get("SpawnZ"); // I don't want to remove existing code, either by myself (Morlok8k) or Corrodias
- newData.put("SpawnX", new IntTag("SpawnX", xyz.getX())); // pulling the data out of the Coordinates,
- newData.put("SpawnY", new IntTag("SpawnY", xyz.getY())); // and putting it into our IntTag's
- newData.put("SpawnZ", new IntTag("SpawnZ", xyz.getZ()));
+ newData.put("SpawnX", new IntTag("SpawnX", xyz.x)); // pulling the data out of the Coordinates,
+ newData.put("SpawnY", new IntTag("SpawnY", xyz.y)); // and putting it into our IntTag's
+ newData.put("SpawnZ", new IntTag("SpawnZ", xyz.z));
// Again, we can't modify the data map in the old Tag, so we have to make a new one.
final CompoundTag newDataTag = new CompoundTag("Data", newData);