|
|
|
@ -96,7 +96,7 @@ public class PlayerTeleporter implements Listener
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
how are islands laid out?
|
|
|
|
|
we start from (1000, 1000) and we put islands at 500 blocks distance up to 10000. then we move to a new row.
|
|
|
|
|
we start from (1000, 1000) and we put islands at <Cache.islandsDistance> blocks distance up to 10000. then we move to a new row.
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
Coordinates islandCoords = new Coordinates(Cache.baseCoords);
|
|
|
|
@ -107,13 +107,13 @@ public class PlayerTeleporter implements Listener
|
|
|
|
|
if(!islandCoords.equals(currentCoords)) break;
|
|
|
|
|
|
|
|
|
|
// else, if they are the same,
|
|
|
|
|
// we have to either increase X or move to a new row, in case it's over 10000.
|
|
|
|
|
// we have to either increase X or move to a new row and reset X, in case it's over 10000.
|
|
|
|
|
if(islandCoords.getX() >= 10000) // if we need to create a new row
|
|
|
|
|
{
|
|
|
|
|
islandCoords.setX(1000);
|
|
|
|
|
islandCoords.setZ(islandCoords.getZ() + 500);
|
|
|
|
|
islandCoords.setZ(islandCoords.getZ() + Cache.islandsDistance);
|
|
|
|
|
} else { // if we just need to increase the column
|
|
|
|
|
islandCoords.setX(islandCoords.getX() + 500);
|
|
|
|
|
islandCoords.setX(islandCoords.getX() + Cache.islandsDistance);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|