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

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

const ORDER_YZX = 0
 
const ORDER_ZXY = 1
 

Protected Attributes

 $chunks = []
 
 $db
 
 $level
 
 $path
 
 $levelData
 

Detailed Description

Definition at line 39 of file LevelDB.php.

Constructor & Destructor Documentation

pocketmine\level\format\leveldb\LevelDB::__construct ( Level  $level,
  $path 
)
Parameters
Level$level
string$path

Implements pocketmine\level\format\LevelProvider.

Definition at line 47 of file LevelDB.php.

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

+ Here is the call graph for this function:

Member Function Documentation

static pocketmine\level\format\leveldb\LevelDB::createChunkSection (   $Y)
static
Parameters
$Y0-7
Returns
ChunkSection

Implements pocketmine\level\format\LevelProvider.

Definition at line 306 of file LevelDB.php.

static pocketmine\level\format\leveldb\LevelDB::generate (   $path,
  $name,
  $seed,
  $generator,
array  $options = [] 
)
static

Generate the needed files in the path given

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 89 of file LevelDB.php.

pocketmine\level\format\leveldb\LevelDB::getChunk (   $chunkX,
  $chunkZ,
  $create = false 
)
Parameters
int$chunkX
int$chunkZ
bool$create
Returns
Chunk

Implements pocketmine\level\format\LevelProvider.

Definition at line 271 of file LevelDB.php.

References pocketmine\level\Level\chunkHash(), and pocketmine\level\format\leveldb\LevelDB\loadChunk().

Referenced by pocketmine\level\format\leveldb\LevelDB\isChunkGenerated(), pocketmine\level\format\leveldb\LevelDB\isChunkPopulated(), pocketmine\level\format\leveldb\LevelDB\requestChunkTask(), and pocketmine\level\format\leveldb\LevelDB\saveChunk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

pocketmine\level\format\leveldb\LevelDB::getDatabase ( )
Returns

Definition at line 285 of file LevelDB.php.

pocketmine\level\format\leveldb\LevelDB::getGenerator ( )

Returns the generator name

Returns
string

Implements pocketmine\level\format\LevelProvider.

Definition at line 168 of file LevelDB.php.

pocketmine\level\format\leveldb\LevelDB::getGeneratorOptions ( )
Returns
array

Implements pocketmine\level\format\LevelProvider.

Definition at line 172 of file LevelDB.php.

pocketmine\level\format\generic\BaseLevelProvider::getLevel ( )
inherited
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 ( )
inherited
Returns
Compound

Definition at line 109 of file BaseLevelProvider.php.

pocketmine\level\format\leveldb\LevelDB::getLoadedChunks ( )
Returns
Chunk[]

Implements pocketmine\level\format\LevelProvider.

Definition at line 176 of file LevelDB.php.

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 76 of file BaseLevelProvider.php.

pocketmine\level\format\generic\BaseLevelProvider::getPath ( )
inherited
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\leveldb\LevelDB::getProviderName ( )
static

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

Returns
string

Implements pocketmine\level\format\LevelProvider.

Definition at line 73 of file LevelDB.php.

static pocketmine\level\format\leveldb\LevelDB::getProviderOrder ( )
static
Returns
int

Implements pocketmine\level\format\LevelProvider.

Definition at line 77 of file LevelDB.php.

pocketmine\level\format\generic\BaseLevelProvider::getSeed ( )
inherited
Returns
int

Implements pocketmine\level\format\LevelProvider.

Definition at line 88 of file BaseLevelProvider.php.

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 96 of file BaseLevelProvider.php.

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 80 of file BaseLevelProvider.php.

pocketmine\level\format\leveldb\LevelDB::isChunkGenerated (   $X,
  $Z 
)
Parameters
int$X
int$Z
Returns
bool

Implements pocketmine\level\format\LevelProvider.

Definition at line 318 of file LevelDB.php.

References pocketmine\level\format\leveldb\LevelDB\getChunk().

+ Here is the call graph for this function:

pocketmine\level\format\leveldb\LevelDB::isChunkLoaded (   $X,
  $Z 
)
Parameters
int$X
int$Z
Returns
bool

Implements pocketmine\level\format\LevelProvider.

Definition at line 180 of file LevelDB.php.

References pocketmine\level\Level\chunkHash().

Referenced by pocketmine\level\format\leveldb\LevelDB\saveChunk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 326 of file LevelDB.php.

References pocketmine\level\format\leveldb\LevelDB\getChunk().

+ Here is the call graph for this function:

static pocketmine\level\format\leveldb\LevelDB::isValid (   $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
true

Implements pocketmine\level\format\LevelProvider.

Definition at line 85 of file LevelDB.php.

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 190 of file LevelDB.php.

References pocketmine\level\Level\chunkHash().

Referenced by pocketmine\level\format\leveldb\LevelDB\getChunk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

pocketmine\level\format\leveldb\LevelDB::requestChunkTask (   $x,
  $z 
)

Requests a MC: PE network chunk to be sent

Parameters
int$x
int$z
Returns
|null

Implements pocketmine\level\format\LevelProvider.

Definition at line 128 of file LevelDB.php.

References pocketmine\level\format\leveldb\LevelDB\getChunk(), and pocketmine\level\format\generic\BaseLevelProvider\getLevel().

+ Here is the call graph for this function:

pocketmine\level\format\leveldb\LevelDB::saveChunk (   $X,
  $Z 
)
Parameters
int$X
int$Z

Implements pocketmine\level\format\LevelProvider.

Definition at line 254 of file LevelDB.php.

References pocketmine\level\format\leveldb\LevelDB\getChunk(), and pocketmine\level\format\leveldb\LevelDB\isChunkLoaded().

+ Here is the call graph for this function:

pocketmine\level\format\leveldb\LevelDB::setChunk (   $chunkX,
  $chunkZ,
FullChunk  $chunk 
)
Parameters
int$chunkX
int$chunkZ
FullChunk$chunk
Returns
mixed

Implements pocketmine\level\format\LevelProvider.

Definition at line 289 of file LevelDB.php.

References pocketmine\level\Level\chunkHash(), pocketmine\level\format\FullChunk\setProvider(), and pocketmine\level\format\leveldb\LevelDB\unloadChunk().

+ Here is the call graph for this function:

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 92 of file BaseLevelProvider.php.

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 100 of file BaseLevelProvider.php.

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 84 of file BaseLevelProvider.php.

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 244 of file LevelDB.php.

References pocketmine\level\Level\chunkHash(), and pocketmine\level\format\FullChunk\unload().

Referenced by pocketmine\level\format\leveldb\LevelDB\setChunk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static pocketmine\level\format\leveldb\LevelDB::usesChunkSection ( )
static
Returns
bool

Implements pocketmine\level\format\LevelProvider.

Definition at line 81 of file LevelDB.php.


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