PocketMine
LevelDB Class Reference
Inheritance diagram for LevelDB:
BaseLevelProvider LevelProvider

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 ()
 
- Public Member Functions inherited from BaseLevelProvider
 __construct (Level $level, $path)
 
 getPath ()
 
 getServer ()
 
 getLevel ()
 
 getName ()
 
 getTime ()
 
 setTime ($value)
 
 getSeed ()
 
 setSeed ($value)
 
 getSpawn ()
 
 setSpawn (Vector3 $pos)
 
 doGarbageCollection ()
 
 getLevelData ()
 
 saveLevelData ()
 

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)
 

Data Fields

const ENTRY_VERSION = "v"
 
const ENTRY_FLAGS = "f"
 
const ENTRY_EXTRA_DATA = "4"
 
const ENTRY_TICKS = "3"
 
const ENTRY_ENTITIES = "2"
 
const ENTRY_TILES = "1"
 
const ENTRY_TERRAIN = "0"
 
- Data Fields inherited from LevelProvider
const ORDER_YZX = 0
 
const ORDER_ZXY = 1
 

Protected Attributes

 $chunks = []
 
 $db
 
- Protected Attributes inherited from BaseLevelProvider
 $level
 
 $path
 
 $levelData
 

Constructor & Destructor Documentation

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

Implements LevelProvider.

Member Function Documentation

static createChunkSection (   $Y)
static
Parameters
$Y0-7
Returns
ChunkSection

Implements LevelProvider.

static 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 LevelProvider.

getChunk (   $chunkX,
  $chunkZ,
  $create = false 
)
Parameters
int$chunkX
int$chunkZ
bool$create
Returns
Chunk

Implements LevelProvider.

getDatabase ( )
Returns
getGenerator ( )

Returns the generator name

Returns
string

Implements LevelProvider.

getGeneratorOptions ( )
Returns
array

Implements LevelProvider.

getLoadedChunks ( )
Returns
FullChunk|Chunk[]

Implements LevelProvider.

static getProviderName ( )
static

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

Returns
string

Implements LevelProvider.

static getProviderOrder ( )
static
Returns
int

Implements LevelProvider.

isChunkGenerated (   $X,
  $Z 
)
Parameters
int$X
int$Z
Returns
bool

Implements LevelProvider.

isChunkLoaded (   $X,
  $Z 
)
Parameters
int$X
int$Z
Returns
bool

Implements LevelProvider.

isChunkPopulated (   $X,
  $Z 
)
Parameters
int$X
int$Z
Returns
bool

Implements LevelProvider.

static 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 LevelProvider.

loadChunk (   $X,
  $Z,
  $create = false 
)
Parameters
int$X
int$Z
bool$create
Returns
bool

Implements LevelProvider.

requestChunkTask (   $x,
  $z 
)

Requests a MC: PE network chunk to be sent

Parameters
int$x
int$z
Returns
|null

Implements LevelProvider.

saveChunk (   $X,
  $Z 
)
Parameters
int$X
int$Z

Implements LevelProvider.

setChunk (   $chunkX,
  $chunkZ,
FullChunk  $chunk 
)
Parameters
int$chunkX
int$chunkZ
FullChunk$chunk
Returns
mixed

Implements LevelProvider.

unloadChunk (   $X,
  $Z,
  $safe = true 
)
Parameters
int$X
int$Z
bool$safe
Returns
bool

Implements LevelProvider.

static usesChunkSection ( )
static
Returns
bool

Implements LevelProvider.


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