[MC-2807] Superflat spawnpoints can be thousands of blocks away from centre of world Created: 11/Nov/12  Updated: 09/Aug/14  Resolved: 21/Oct/13

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.4.2, Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w06a, Snapshot 13w09a, Snapshot 13w09b, Snapshot 13w09c, Minecraft 1.5, Minecraft 1.5.1, Minecraft 1.6.2, Minecraft 1.6.4
Fix Version/s: None

Type: Bug
Reporter: majaha Assignee: Unassigned
Resolution: Works As Intended Votes: 4
Labels: None
Environment:

Windows 7
Java 1.7.0_07


CHK:
Confirmation Status: Confirmed

 Description   

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   
Comment by Markku [ 30/Sep/13 ]

Affects 1.6.4.

Comment by majaha [ 23/Mar/13 ]

This still affects 1.5.1

Comment by Markku [ 02/Mar/13 ]

Affects 13w09c.

Comment by Markku [ 02/Mar/13 ]

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();
        }
Comment by Markku [ 05/Feb/13 ]

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.

Generated at Sun Jan 12 11:59:07 UTC 2025 using Jira 9.12.2#9120002-sha1:301bf498dd45d800842af0b84230f1bb58606c13.