When creating a new superflat world, that world's spawnpoint can be over 1000 blocks away from the centre of the world.
Not that it matters very much, but that seems to be inconsistant with default world spawnpoints, which never seem to be more than 400 blocks away in each axis.
Anyway, it would be nice if superflat world spawnpoints were always at (0,0,0) seeing as they are generated the same everywere, if just for pureness' sake.
Comments 5
Fix
Couldn't get it exactly 0,some,0, but within chunk distance of that. No point in doing 1000 tries when it indeed does not make a real difference.
WorldServer.createSpawnPosition()
// CHANGED TO REMOVE THE 'ELSE'
if (!this.provider.canRespawnHere()) {
this.worldInfo.setSpawnPosition(0, this.provider.getAverageGroundLevel(), 0);
return;
}
// THE FIX:
if (worldSettings.getTerrainType() == WorldType.FLAT) {
this.findingSpawnPoint = true;
int y = this.provider.getAverageGroundLevel();
this.worldInfo.setSpawnPosition(0, y, 0);
this.findingSpawnPoint = false;
} else {
// OLD CODE IN THIS 'ELSE'
this.findingSpawnPoint = true;
...
}
// AND ALSO OLD CODE
if (worldSettings.isBonusChestEnabled()) {
this.createBonusChest();
}
The spawnpoint can be also in normal worlds more than 1000 blocks away. It just needs to start in a world with large ocean around 0,0,0, which is quite rare though.
But, yeah, would be nice to change the spawnpoint decision process just enough to notice superflat and skip the searching of suitable location in that case.