Hello, I am currently trying to generate a world then set a block. I have it where when a new player joins It generates the world, but It does not setBlock (Not supposed to). Now when the new player does /is go for the first time it is supposed to setBlock, yet it doesnt. Here is my Code PHP: /* Generate one Bedrock Block */$level->setBlock(new Vector3(0, 100, 0), BlockFactory::get(Block::BEDROCK));
The problem is when you create a new world, the world is surely "loaded" but not "generated". The generation task runs asynchronously and will override your setBlocks. Code: $level->generateLevel(...); // ^ will also call $level->populateChunk(all spawn chunks); $level->setBlock(...); // run by you // an uncertain amount of time later // pmmp $level->setChunk(populated chunks); <-- this overrides the blocks You could do what @GamakCZ said, that's the simplest way to go with this. Or you could create an async event which calls back once all loaded chunks of the level are populated.