Pocketmine-mp: Generator::getSpawn is not used

Created on 29 Jul 2017  路  4Comments  路  Source: pmmp/PocketMine-MP

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

  • VoidGeneratorTest

Crashdump, backtrace or other files

API Core Debugged

Most helpful comment

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

All 4 comments

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

@Ad5001, YOU ARE GENIUS. I did this more than year 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...

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

Was this page helpful?
0 / 5 - 0 ratings

Related issues

Muqsit picture Muqsit  路  3Comments

arfianadam picture arfianadam  路  3Comments

L3ice picture L3ice  路  3Comments

dktapps picture dktapps  路  3Comments

jasonwynn10 picture jasonwynn10  路  3Comments