pmmp / PocketMine-MP

A server software for Minecraft: Bedrock Edition in PHP
https://pmmp.io
GNU Lesser General Public License v3.0
3.28k stars 1.56k forks source link

Generator::getSpawn is not used #1258

Closed tarik02 closed 1 year ago

tarik02 commented 7 years ago

Issue description

Expected result: When override Generator::getSpawn and return any coordinates, level spawn will be there. Actual result: Level spawn is always on coordinates 256x70x256(https://github.com/pmmp/PocketMine-MP/blob/master/src/pocketmine/level/format/io/region/McRegion.php#L255)

Steps to reproduce the issue

  1. Create custom generator with getSpawn returns new Vector3(0, 35, 0)
  2. Generate world with the generator
  3. Try to login to the server: you will be spawned on 256x70x256

OS and versions

Plugins

Crashdump, backtrace or other files

Ad5001 commented 7 years ago

Found a workaroud this, you can check if the player teleports to the world and set his spawn.

tarik02 commented 7 years ago

@Ad5001, YOU ARE GENIUS. I did this more than year ago...

jasonw4331 commented 7 years ago

Maybe Generator::getSpawn() should be made static for this to be fixed. I don't think it would break much in comparison to all the other API changes happening...

tarik02 commented 7 years ago

@jasonwynn10, no. It should not be static because server uses generator instance. Avoid static.

dktapps commented 1 year ago

This function was removed by 86a5a50330c5555e71aba73e5192a29f979de465, so this is no longer relevant.