GenisysPro  for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
LevelProvider Interface Reference

Public Member Functions

 __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 ()
 

Static Public Member Functions

static getProviderName ()
 
static isValid (string $path)
 
static generate (string $path, string $name, $seed, string $generator, array $options=[])
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( Level  $level,
string  $path 
)
Parameters
Level$level
string$path

Implemented in LevelDB, and BaseLevelProvider.

Member Function Documentation

◆ close()

close ( )

Implemented in LevelDB, and McRegion.

◆ doGarbageCollection()

doGarbageCollection ( )

Implemented in McRegion, and BaseLevelProvider.

◆ 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()

getGenerator ( )

Returns the generator name

Returns
string

Implemented in McRegion, and LevelDB.

◆ getGeneratorOptions()

getGeneratorOptions ( )
Returns
array

Implemented in McRegion, and LevelDB.

◆ getLevel()

getLevel ( )
Returns
Level

Implemented in BaseLevelProvider.

◆ getLoadedChunks()

getLoadedChunks ( )
Returns
Chunk[]

Implemented in McRegion, and LevelDB.

◆ getName()

getName ( )
Returns
string

Implemented in BaseLevelProvider.

◆ getPath()

getPath ( )
Returns
string

Implemented in BaseLevelProvider.

◆ 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()

getSeed ( )
Returns
int

Implemented in BaseLevelProvider.

◆ getSpawn()

getSpawn ( )
Returns
Vector3

Implemented in BaseLevelProvider.

◆ getTime()

getTime ( )
Returns
int|string int, or the string numeric representation of a long in 32-bit systems

Implemented in BaseLevelProvider.

◆ getWorldHeight()

getWorldHeight ( )

Gets the build height limit of this world

Returns
int

Implemented in McRegion, Anvil, and LevelDB.

◆ isChunkGenerated()

isChunkGenerated ( int  $chunkX,
int  $chunkZ 
)
Parameters
int$chunkX
int$chunkZ
Returns
bool

Implemented in LevelDB, and McRegion.

◆ isChunkLoaded()

isChunkLoaded ( int  $chunkX,
int  $chunkZ 
)
Parameters
int$chunkX
int$chunkZ
Returns
bool

Implemented in McRegion, and LevelDB.

◆ isChunkPopulated()

isChunkPopulated ( int  $chunkX,
int  $chunkZ 
)
Parameters
int$chunkX
int$chunkZ
Returns
bool

Implemented in LevelDB, and McRegion.

◆ 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
string$path
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
int$x
int$z
Returns
|null

Implemented in BaseLevelProvider.

◆ saveChunk()

saveChunk ( int  $chunkX,
int  $chunkZ 
)
Parameters
int$chunkX
int$chunkZ
Returns
bool

Implemented in LevelDB, and McRegion.

◆ saveChunks()

saveChunks ( )

Implemented in McRegion, and LevelDB.

◆ setChunk()

setChunk ( int  $chunkX,
int  $chunkZ,
Chunk  $chunk 
)
Parameters
int$chunkX
int$chunkZ
Chunk$chunk

Implemented in LevelDB, and McRegion.

◆ setSeed()

setSeed (   $value)
Parameters
int | string$valueint, or the string numeric representation of a long in 32-bit systems

Implemented in BaseLevelProvider.

◆ setSpawn()

setSpawn ( Vector3  $pos)
Parameters
Vector3$pos

Implemented in BaseLevelProvider.

◆ setTime()

setTime (   $value)
Parameters
int | string$valueint, 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()

unloadChunks ( )

Implemented in McRegion, and LevelDB.


The documentation for this interface was generated from the following file: