|
| __construct (Level $level, string $path) |
|
| getWorldHeight () |
|
| getPath () |
|
| getGenerator () |
|
| getGeneratorOptions () |
|
| getChunk (int $chunkX, int $chunkZ, bool $create=false) |
|
| setChunk (int $chunkX, int $chunkZ, Chunk $chunk) |
|
| saveChunk (int $chunkX, int $chunkZ) |
|
| saveChunks () |
|
| loadChunk (int $chunkX, int $chunkZ, bool $create=false) |
|
| unloadChunk (int $chunkX, int $chunkZ, bool $safe=true) |
|
| unloadChunks () |
|
| isChunkLoaded (int $chunkX, int $chunkZ) |
|
| isChunkGenerated (int $chunkX, int $chunkZ) |
|
| isChunkPopulated (int $chunkX, int $chunkZ) |
|
| requestChunkTask (int $x, int $z) |
|
| getName () |
|
| getTime () |
|
| setTime ($value) |
|
| getSeed () |
|
| setSeed ($value) |
|
| getSpawn () |
|
| setSpawn (Vector3 $pos) |
|
| getLoadedChunks () |
|
| doGarbageCollection () |
|
| getLevel () |
|
| close () |
|
◆ __construct()
__construct |
( |
Level |
$level, |
|
|
string |
$path |
|
) |
| |
◆ close()
◆ doGarbageCollection()
◆ generate()
static generate |
( |
string |
$path, |
|
|
string |
$name, |
|
|
|
$seed, |
|
|
string |
$generator, |
|
|
array |
$options = [] |
|
) |
| |
|
static |
Generate the needed files in the path given
- Parameters
-
string | $path | |
string | $name | |
int | string | $seed | |
string | $generator | |
| array[] | $options |
Implemented in McRegion, and LevelDB.
◆ getChunk()
getChunk |
( |
int |
$chunkX, |
|
|
int |
$chunkZ, |
|
|
bool |
$create = false |
|
) |
| |
Gets the Chunk object This method must be implemented by all the level formats.
- Parameters
-
int | $chunkX | |
int | $chunkZ | |
bool | $create | |
- Returns
- Chunk|null
Implemented in LevelDB, and McRegion.
◆ getGenerator()
Returns the generator name
- Returns
- string
Implemented in McRegion, and LevelDB.
◆ getGeneratorOptions()
◆ getLevel()
◆ getLoadedChunks()
◆ getName()
◆ getPath()
◆ getProviderName()
static getProviderName |
( |
| ) |
|
|
static |
Returns the full provider name, like "anvil" or "mcregion", will be used to find the correct format.
- Returns
- string
Implemented in McRegion, Anvil, PMAnvil, and LevelDB.
◆ getSeed()
◆ getSpawn()
◆ getTime()
- Returns
- int|string int, or the string numeric representation of a long in 32-bit systems
Implemented in BaseLevelProvider.
◆ getWorldHeight()
◆ isChunkGenerated()
isChunkGenerated |
( |
int |
$chunkX, |
|
|
int |
$chunkZ |
|
) |
| |
◆ isChunkLoaded()
isChunkLoaded |
( |
int |
$chunkX, |
|
|
int |
$chunkZ |
|
) |
| |
◆ isChunkPopulated()
isChunkPopulated |
( |
int |
$chunkX, |
|
|
int |
$chunkZ |
|
) |
| |
◆ isValid()
static isValid |
( |
string |
$path | ) |
|
|
static |
Tells if the path is a valid level. This must tell if the current format supports opening the files in the directory
- Parameters
-
- Returns
- bool
Implemented in McRegion, and LevelDB.
◆ loadChunk()
loadChunk |
( |
int |
$chunkX, |
|
|
int |
$chunkZ, |
|
|
bool |
$create = false |
|
) |
| |
- Parameters
-
int | $chunkX | |
int | $chunkZ | |
bool | $create | |
- Returns
- bool
Implemented in McRegion, and LevelDB.
◆ requestChunkTask()
requestChunkTask |
( |
int |
$x, |
|
|
int |
$z |
|
) |
| |
Requests a MC: PE network chunk to be sent
- Parameters
-
- Returns
- |null
Implemented in BaseLevelProvider.
◆ saveChunk()
saveChunk |
( |
int |
$chunkX, |
|
|
int |
$chunkZ |
|
) |
| |
◆ saveChunks()
◆ setChunk()
setChunk |
( |
int |
$chunkX, |
|
|
int |
$chunkZ, |
|
|
Chunk |
$chunk |
|
) |
| |
◆ setSeed()
- Parameters
-
int | string | $value | int, or the string numeric representation of a long in 32-bit systems |
Implemented in BaseLevelProvider.
◆ setSpawn()
◆ setTime()
- Parameters
-
int | string | $value | int, or the string numeric representation of a long in 32-bit systems |
Implemented in BaseLevelProvider.
◆ unloadChunk()
unloadChunk |
( |
int |
$chunkX, |
|
|
int |
$chunkZ, |
|
|
bool |
$safe = true |
|
) |
| |
- Parameters
-
int | $chunkX | |
int | $chunkZ | |
bool | $safe | |
- Returns
- bool
Implemented in LevelDB, and McRegion.
◆ unloadChunks()
The documentation for this interface was generated from the following file:
- src/pocketmine/level/format/io/LevelProvider.php