Updated World Parser / Data to account for Y of corner blocks.

Use same height to have no height limits.
This commit is contained in:
Chiss 2013-09-12 09:01:37 +10:00
parent 9490549a96
commit 60dd6c84d0
2 changed files with 17 additions and 3 deletions

View File

@ -272,11 +272,10 @@ public class WorldData
try
{
MinY = Integer.parseInt(tokens[1]);
CurZ = MinZ;
}
catch (Exception e)
{
System.out.println("World Data Read Error: Invalid MinZ [" + tokens[1] + "]");
System.out.println("World Data Read Error: Invalid MinY [" + tokens[1] + "]");
}
}
else if (tokens[0].equalsIgnoreCase("MAX_Y"))
@ -287,7 +286,7 @@ public class WorldData
}
catch (Exception e)
{
System.out.println("World Data Read Error: Invalid MaxZ [" + tokens[1] + "]");
System.out.println("World Data Read Error: Invalid MaxY [" + tokens[1] + "]");
}
}
}

View File

@ -183,6 +183,21 @@ public class WorldParser
out.write("MIN_Z:"+Math.min(cornerA.getBlockZ(), cornerB.getBlockZ()));
out.write("\n");
out.write("MAX_Z:"+Math.max(cornerA.getBlockZ(), cornerB.getBlockZ()));
out.write("\n");
out.write("\n");
if (cornerA.getBlockY() == cornerB.getBlockY())
{
out.write("MIN_Y:0");
out.write("\n");
out.write("MAX_Y:256");
}
else
{
out.write("MIN_Y:"+Math.min(cornerA.getBlockY(), cornerB.getBlockY()));
out.write("\n");
out.write("MAX_Y:"+Math.max(cornerA.getBlockY(), cornerB.getBlockY()));
}
//Teams
for (String team : TeamLocs.keySet())