Skip to content

WorldProvider ​

interface · pocketmine\world\format\io\WorldProvider · source

Methods ​

calculateChunkCount() ​

php
public function calculateChunkCount() : int

Returns the number of chunks in the provider. Used for world conversion time estimations.

close() ​

php
public function close() : void

Performs cleanups necessary when the world provider is closed and no longer needed.

doGarbageCollection() ​

php
public function doGarbageCollection() : void

Performs garbage collection in the world provider, such as cleaning up regions in Region-based worlds.

getAllChunks() ​

php
public function getAllChunks(bool $skipCorrupted = false, ?\Logger $logger = null) : \Generator

Returns a generator which yields all the chunks in this world.

getPath() ​

php
public function getPath() : string

getWorldData() ​

php
public function getWorldData() : \pocketmine\world\format\io\WorldData

Returns information about the world

getWorldMaxY() ​

php
public function getWorldMaxY() : int

Gets the build height limit of this world

getWorldMinY() ​

php
public function getWorldMinY() : int

Returns the lowest buildable Y coordinate of this world

loadChunk() ​

php
public function loadChunk(int $chunkX, int $chunkZ) : ?\pocketmine\world\format\io\LoadedChunkData

Loads a chunk (usually from disk storage) and returns it. If the chunk does not exist, null is returned.

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