Skip to content

VanillaDataManager 5.46.0 ​

final class · pocketmine\world\generator\vanilla\VanillaDataManager · source

Main-thread side of the automatic vanilla data setup, called when a world using the vanilla generator is created or loaded (generator preset validation).

  • Data ready: nothing to do.
  • Data missing during server startup (no players yet, tick 0): the fetch runs in a VanillaDataFetchThread and the world load waits for it, logging progress. The main thread only sleeps; nothing is ticking yet.
  • Data missing while the server is running: the fetch starts in the background and this world load is refused with a message (loading it again once the data is ready works). Blocking would freeze the server, and letting generation workers wait would block the shared async pool (and its shutdown).
  • Failures (no network, checksum mismatch, generator error) refuse the world load with the reason; the next load attempt retries. Unsupported platforms without a configured Java are reported without downloading anything.

Methods ​

ensureReady() ​

php
public static function ensureReady(string $root) : ?string

Returns null if the data in $root is ready, otherwise why the world cannot be loaded yet.

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.