Skip to content

Spawn command#30

Merged
MelonMojito merged 2 commits intoMelonModding:mainfrom
ipiepiepie:spawn-feature
Jul 19, 2025
Merged

Spawn command#30
MelonMojito merged 2 commits intoMelonModding:mainfrom
ipiepiepie:spawn-feature

Conversation

@ipiepiepie
Copy link
Contributor

@ipiepiepie ipiepiepie commented Jun 10, 2025

Sometimes newcomers on MelonBTA miss spawn due to the game spawn logic, which spawns player in the area, not a specific point.

ChunkCoordinates chunkcoordinates = world.getSpawnPoint();
int i = chunkcoordinates.x;
int j = chunkcoordinates.z;
int k = chunkcoordinates.y;
if (!world.worldType.hasCeiling()) {  // <-- here minecraft rolls random spawn coordinates
    i += this.random.nextInt(20) - 10;
    k = world.findTopSolidBlock(i, j);
    j += this.random.nextInt(20) - 10;
}

This PR fixes spawn issue by changing this logic. If spawn is set by /spawn set command, then server will always spawn new players and respawn players without bed on the exact spawn location.


Also usage of /spawn is more intuitive for newcomers, because most minecraft servers are using /spawn command instead of /warp tp spawn, which currently used on MelonBTA.

@MelonMojito MelonMojito merged commit b196734 into MelonModding:main Jul 19, 2025
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants