PHP Interface pocketmine\level\format\LevelProvider

Show file Open project: ClearSkyTeam/ClearSky Interface Usage Examples

Public Methods

Method Description
__construct ( Level $level, string $path )
close ( )
createChunkSection ( $Y ) : pocketmine\level\format\ChunkSection
doGarbageCollection ( )
generate ( string $path, string $name, integer $seed, string $generator, array $options = [] ) Generate the needed files in the path given
getChunk ( integer $X, integer $Z, boolean $create = false ) : pocketmine\level\format\FullChunk | pocketmine\level\format\Chunk Gets the Chunk object This method must be implemented by all the level formats.
getGameRules ( ) : CompoundTag
getGenerator ( ) : string Returns the generator name
getGeneratorOptions ( ) : array
getLevel ( ) : Level
getLoadedChunks ( ) : pocketmine\level\format\FullChunk | pocketmine\level\format\Chunk[]
getName ( ) : string
getPath ( ) : string
getProviderName ( ) : string Returns the full provider name, like "anvil" or "mcregion", will be used to find the correct format.
getProviderOrder ( ) : integer
getSeed ( ) : integer | string
getSpawn ( ) : Vector3
getTime ( ) : integer
isChunkGenerated ( integer $X, integer $Z ) : boolean
isChunkLoaded ( integer $X, integer $Z ) : boolean
isChunkPopulated ( integer $X, integer $Z ) : boolean
isValid ( string $path ) : true Tells if the path is a valid level.
loadChunk ( integer $X, integer $Z, boolean $create = false ) : boolean
requestChunkTask ( integer $x, integer $z ) : AsyncTask | null Requests a MC: PE network chunk to be sent
saveChunk ( integer $X, integer $Z )
saveChunks ( )
setChunk ( integer $chunkX, integer $chunkZ, pocketmine\level\format\FullChunk $chunk ) : mixed
setGameRules ( CompoundTag $rules )
setSeed ( integer $value )
setSpawn ( Vector3 $pos )
setTime ( integer $value )
unloadChunk ( integer $X, integer $Z, boolean $safe = true ) : boolean
unloadChunks ( )
usesChunkSection ( ) : boolean

Method Details

__construct() public method

public __construct ( Level $level, string $path )
$level pocketmine\level\Level
$path string

close() public method

public close ( )

createChunkSection() public static method

public static createChunkSection ( $Y ) : pocketmine\level\format\ChunkSection
$Y 0-7
return pocketmine\level\format\ChunkSection

doGarbageCollection() public method

public doGarbageCollection ( )

generate() public static method

Generate the needed files in the path given
public static generate ( string $path, string $name, integer $seed, string $generator, array $options = [] )
$path string
$name string
$seed integer
$generator string
$options array

getChunk() public method

Gets the Chunk object This method must be implemented by all the level formats.
public getChunk ( integer $X, integer $Z, boolean $create = false ) : pocketmine\level\format\FullChunk | pocketmine\level\format\Chunk
$X integer absolute Chunk X value
$Z integer absolute Chunk Z value
$create boolean Whether to generate the chunk if it does not exist
return pocketmine\level\format\FullChunk | pocketmine\level\format\Chunk

getGameRules() public method

public getGameRules ( ) : CompoundTag
return pocketmine\nbt\tag\CompoundTag

getGenerator() public method

Returns the generator name
public getGenerator ( ) : string
return string

getGeneratorOptions() public method

public getGeneratorOptions ( ) : array
return array

getLevel() public method

public getLevel ( ) : Level
return pocketmine\level\Level

getLoadedChunks() public method

public getLoadedChunks ( ) : pocketmine\level\format\FullChunk | pocketmine\level\format\Chunk[]
return pocketmine\level\format\FullChunk | pocketmine\level\format\Chunk[]

getName() public method

public getName ( ) : string
return string

getPath() public method

public getPath ( ) : string
return string

getProviderName() public static method

Returns the full provider name, like "anvil" or "mcregion", will be used to find the correct format.
public static getProviderName ( ) : string
return string

getProviderOrder() public static method

public static getProviderOrder ( ) : integer
return integer

getSeed() public method

public getSeed ( ) : integer | string
return integer | string int, or the string numeric representation of a long in 32-bit systems

getSpawn() public method

public getSpawn ( ) : Vector3
return pocketmine\math\Vector3

getTime() public method

public getTime ( ) : integer
return integer

isChunkGenerated() public method

public isChunkGenerated ( integer $X, integer $Z ) : boolean
$X integer
$Z integer
return boolean

isChunkLoaded() public method

public isChunkLoaded ( integer $X, integer $Z ) : boolean
$X integer
$Z integer
return boolean

isChunkPopulated() public method

public isChunkPopulated ( integer $X, integer $Z ) : boolean
$X integer
$Z integer
return boolean

isValid() public static method

This must tell if the current format supports opening the files in the directory
public static isValid ( string $path ) : true
$path string
return true

loadChunk() public method

public loadChunk ( integer $X, integer $Z, boolean $create = false ) : boolean
$X integer
$Z integer
$create boolean
return boolean

requestChunkTask() public method

Requests a MC: PE network chunk to be sent
public requestChunkTask ( integer $x, integer $z ) : AsyncTask | null
$x integer
$z integer
return pocketmine\scheduler\AsyncTask | null

saveChunk() public method

public saveChunk ( integer $X, integer $Z )
$X integer
$Z integer

saveChunks() public method

public saveChunks ( )

setChunk() public method

public setChunk ( integer $chunkX, integer $chunkZ, pocketmine\level\format\FullChunk $chunk ) : mixed
$chunkX integer
$chunkZ integer
$chunk pocketmine\level\format\FullChunk
return mixed

setGameRules() public method

public setGameRules ( CompoundTag $rules )
$rules pocketmine\nbt\tag\CompoundTag

setSeed() public method

public setSeed ( integer $value )
$value integer

setSpawn() public method

public setSpawn ( Vector3 $pos )
$pos pocketmine\math\Vector3

setTime() public method

public setTime ( integer $value )
$value integer

unloadChunk() public method

public unloadChunk ( integer $X, integer $Z, boolean $safe = true ) : boolean
$X integer
$Z integer
$safe boolean
return boolean

unloadChunks() public method

public unloadChunks ( )

usesChunkSection() public static method

public static usesChunkSection ( ) : boolean
return boolean