PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
pocketmine\level\format\generic\BaseLevelProvider Class Reference
+ Inheritance diagram for pocketmine\level\format\generic\BaseLevelProvider:
+ Collaboration diagram for pocketmine\level\format\generic\BaseLevelProvider:

Public Member Functions

 __construct (Level $level, $path)
 
 getPath ()
 
 getServer ()
 
 getLevel ()
 
 getName ()
 
 getTime ()
 
 setTime ($value)
 
 getSeed ()
 
 setSeed ($value)
 
 getSpawn ()
 
 setSpawn (Vector3 $pos)
 
 getLevelData ()
 
 saveLevelData ()
 
 requestChunkTask ($x, $z)
 
 getGenerator ()
 
 getGeneratorOptions ()
 
 getChunk ($X, $Z, $create=false)
 
 saveChunks ()
 
 saveChunk ($X, $Z)
 
 unloadChunks ()
 
 loadChunk ($X, $Z, $create=false)
 
 unloadChunk ($X, $Z, $safe=true)
 
 isChunkGenerated ($X, $Z)
 
 isChunkPopulated ($X, $Z)
 
 isChunkLoaded ($X, $Z)
 
 setChunk ($chunkX, $chunkZ, FullChunk $chunk)
 
 getLoadedChunks ()
 
 close ()
 

Static Public Member Functions

static getProviderName ()
 
static getProviderOrder ()
 
static usesChunkSection ()
 
static isValid ($path)
 
static generate ($path, $name, $seed, $generator, array $options=[])
 
static createChunkSection ($Y)
 

Public Attributes

const ORDER_YZX = 0
 
const ORDER_ZXY = 1
 

Protected Attributes

 $level
 
 $path
 
 $levelData
 

Detailed Description

Definition at line 34 of file BaseLevelProvider.php.

Constructor & Destructor Documentation

pocketmine\level\format\generic\BaseLevelProvider::__construct ( Level  $level,
  $path 
)
Parameters
Level$level
string$path

Implements pocketmine\level\format\LevelProvider.

Definition at line 42 of file BaseLevelProvider.php.

References pocketmine\level\format\generic\BaseLevelProvider\getPath().

+ Here is the call graph for this function:

Member Function Documentation

static pocketmine\level\format\LevelProvider::createChunkSection (   $Y)
staticinherited
static pocketmine\level\format\LevelProvider::generate (   $path,
  $name,
  $seed,
  $generator,
array  $options = [] 
)
staticinherited

Generate the needed files in the path given

Parameters
string$path
string$name
int$seed
string$generator
array[]$options

Implemented in pocketmine\level\format\leveldb\LevelDB, and pocketmine\level\format\mcregion\McRegion.

pocketmine\level\format\LevelProvider::getChunk (   $X,
  $Z,
  $create = false 
)
inherited

Gets the Chunk object This method must be implemented by all the level formats.

Parameters
int$Xabsolute Chunk X value
int$Zabsolute Chunk Z value
bool$createWhether to generate the chunk if it does not exist
Returns
Chunk

Implemented in pocketmine\level\format\leveldb\LevelDB, pocketmine\level\format\mcregion\McRegion, and pocketmine\level\format\anvil\Anvil.

pocketmine\level\format\LevelProvider::getGenerator ( )
inherited

Returns the generator name

Returns
string

Implemented in pocketmine\level\format\leveldb\LevelDB, and pocketmine\level\format\mcregion\McRegion.

pocketmine\level\format\LevelProvider::getGeneratorOptions ( )
inherited
pocketmine\level\format\generic\BaseLevelProvider::getLevel ( )
Returns
Level

Implements pocketmine\level\format\LevelProvider.

Definition at line 72 of file BaseLevelProvider.php.

Referenced by pocketmine\level\format\anvil\Anvil\requestChunkTask(), pocketmine\level\format\mcregion\McRegion\requestChunkTask(), and pocketmine\level\format\leveldb\LevelDB\requestChunkTask().

+ Here is the caller graph for this function:

pocketmine\level\format\generic\BaseLevelProvider::getLevelData ( )
Returns
Compound

Definition at line 109 of file BaseLevelProvider.php.

pocketmine\level\format\LevelProvider::getLoadedChunks ( )
inherited
pocketmine\level\format\generic\BaseLevelProvider::getName ( )
Returns
string

Implements pocketmine\level\format\LevelProvider.

Definition at line 76 of file BaseLevelProvider.php.

pocketmine\level\format\generic\BaseLevelProvider::getPath ( )
Returns
string

Implements pocketmine\level\format\LevelProvider.

Definition at line 64 of file BaseLevelProvider.php.

Referenced by pocketmine\level\format\generic\BaseLevelProvider\__construct(), and pocketmine\level\format\leveldb\LevelDB\__construct().

+ Here is the caller graph for this function:

static pocketmine\level\format\LevelProvider::getProviderName ( )
staticinherited

Returns the full provider name, like "anvil" or "mcregion", will be used to find the correct format.

Returns
string

Implemented in pocketmine\level\format\leveldb\LevelDB, pocketmine\level\format\mcregion\McRegion, and pocketmine\level\format\anvil\Anvil.

static pocketmine\level\format\LevelProvider::getProviderOrder ( )
staticinherited
pocketmine\level\format\generic\BaseLevelProvider::getSeed ( )
Returns
int

Implements pocketmine\level\format\LevelProvider.

Definition at line 88 of file BaseLevelProvider.php.

pocketmine\level\format\generic\BaseLevelProvider::getSpawn ( )
Returns
Vector3

Implements pocketmine\level\format\LevelProvider.

Definition at line 96 of file BaseLevelProvider.php.

pocketmine\level\format\generic\BaseLevelProvider::getTime ( )
Returns
int

Implements pocketmine\level\format\LevelProvider.

Definition at line 80 of file BaseLevelProvider.php.

pocketmine\level\format\LevelProvider::isChunkGenerated (   $X,
  $Z 
)
inherited
pocketmine\level\format\LevelProvider::isChunkLoaded (   $X,
  $Z 
)
inherited
Parameters
int$X
int$Z
Returns
bool

Implemented in pocketmine\level\format\leveldb\LevelDB, and pocketmine\level\format\mcregion\McRegion.

pocketmine\level\format\LevelProvider::isChunkPopulated (   $X,
  $Z 
)
inherited
Parameters
int$X
int$Z
Returns
bool

Implemented in pocketmine\level\format\leveldb\LevelDB, and pocketmine\level\format\mcregion\McRegion.

static pocketmine\level\format\LevelProvider::isValid (   $path)
staticinherited

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
true

Implemented in pocketmine\level\format\leveldb\LevelDB, pocketmine\level\format\mcregion\McRegion, and pocketmine\level\format\anvil\Anvil.

pocketmine\level\format\LevelProvider::loadChunk (   $X,
  $Z,
  $create = false 
)
inherited
Parameters
int$X
int$Z
bool$create
Returns
bool

Implemented in pocketmine\level\format\leveldb\LevelDB, and pocketmine\level\format\mcregion\McRegion.

pocketmine\level\format\LevelProvider::requestChunkTask (   $x,
  $z 
)
inherited

Requests a MC: PE network chunk to be sent

Parameters
int$x
int$z
Returns
|null

Implemented in pocketmine\level\format\leveldb\LevelDB, pocketmine\level\format\mcregion\McRegion, and pocketmine\level\format\anvil\Anvil.

pocketmine\level\format\LevelProvider::saveChunk (   $X,
  $Z 
)
inherited
pocketmine\level\format\LevelProvider::setChunk (   $chunkX,
  $chunkZ,
FullChunk  $chunk 
)
inherited
pocketmine\level\format\generic\BaseLevelProvider::setSeed (   $value)
Parameters
int$value

Implements pocketmine\level\format\LevelProvider.

Definition at line 92 of file BaseLevelProvider.php.

pocketmine\level\format\generic\BaseLevelProvider::setSpawn ( Vector3  $pos)
Parameters
Vector3$pos

Implements pocketmine\level\format\LevelProvider.

Definition at line 100 of file BaseLevelProvider.php.

pocketmine\level\format\generic\BaseLevelProvider::setTime (   $value)
Parameters
int$value

Implements pocketmine\level\format\LevelProvider.

Definition at line 84 of file BaseLevelProvider.php.

pocketmine\level\format\LevelProvider::unloadChunk (   $X,
  $Z,
  $safe = true 
)
inherited
Parameters
int$X
int$Z
bool$safe
Returns
bool

Implemented in pocketmine\level\format\leveldb\LevelDB, and pocketmine\level\format\mcregion\McRegion.

static pocketmine\level\format\LevelProvider::usesChunkSection ( )
staticinherited

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