This plugin demonstrates how to write a generator that generates a monster spawner room with a monster spawner and a chest in PocketMine-MP. It does this by using a function that takes in a (seed, chunkX, chunkZ)
as input and outputs a Vector3|null
spawner position.
This method avoids the need for Generator
and ChunkPopulateEvent
to exchange arbitrary data.
- Install the plugin on your server
- Make the following changes in your
pocketmine.yml
:worlds: world: generator: normal + msp: + generator: normal_msp
- Teleport yourself to the world named
msp
- Explore the world. The console will generate blue messages with monster spawner room coordinates:
[16:07:08.079] [Server thread/NOTICE]: [MonsterSpawnerGenerator] Generated monster spawner room in msp at Vector3(x=68,y=23,z=959)