Added support for multiple dimensions

This commit is contained in:
simon
2018-02-25 14:15:03 -05:00
parent 6a1519d97d
commit 8c6e580ea9
13 changed files with 134 additions and 66 deletions

View File

@@ -30,7 +30,8 @@ public class UserCreationListener implements GameEventListener {
while (point == null || cubot.getWorld() == null) {
int spawnX = GameServer.INSTANCE.getConfig().getInt("new_user_worldX") + random.nextInt(5);
int spawnY = GameServer.INSTANCE.getConfig().getInt("new_user_worldY") + random.nextInt(5);
cubot.setWorld(GameServer.INSTANCE.getGameUniverse().getWorld(spawnX, spawnY, true));
String dimension = GameServer.INSTANCE.getConfig().getString("new_user_dimension");
cubot.setWorld(GameServer.INSTANCE.getGameUniverse().getWorld(spawnX, spawnY, true, dimension));
point = cubot.getWorld().getRandomPassableTile();
}