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

Public Member Functions

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

Static Public Member Functions

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

Public Attributes

const ORDER_YZX = 0
 
const ORDER_ZXY = 1
 

Protected Member Functions

 getRegion ($x, $z)
 
 loadRegion ($x, $z)
 

Protected Attributes

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

Detailed Description

Definition at line 38 of file McRegion.php.

Member Function Documentation

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 261 of file McRegion.php.

static pocketmine\level\format\mcregion\McRegion::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 74 of file McRegion.php.

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 229 of file McRegion.php.

References pocketmine\level\Level\chunkHash(), and pocketmine\level\format\mcregion\McRegion\loadChunk().

Referenced by pocketmine\level\format\mcregion\McRegion\isChunkGenerated(), pocketmine\level\format\mcregion\McRegion\isChunkPopulated(), pocketmine\level\format\mcregion\McRegion\requestChunkTask(), and pocketmine\level\format\mcregion\McRegion\saveChunk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

pocketmine\level\format\mcregion\McRegion::getGenerator ( )

Returns the generator name

Returns
string

Implements pocketmine\level\format\LevelProvider.

Definition at line 150 of file McRegion.php.

pocketmine\level\format\mcregion\McRegion::getGeneratorOptions ( )
Returns
array

Implements pocketmine\level\format\LevelProvider.

Definition at line 154 of file McRegion.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\mcregion\McRegion::getLoadedChunks ( )
Returns
Chunk[]

Implements pocketmine\level\format\LevelProvider.

Definition at line 158 of file McRegion.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\mcregion\McRegion::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 46 of file McRegion.php.

static pocketmine\level\format\mcregion\McRegion::getProviderOrder ( )
static
Returns
int

Implements pocketmine\level\format\LevelProvider.

Definition at line 50 of file McRegion.php.

pocketmine\level\format\mcregion\McRegion::getRegion (   $x,
  $z 
)
protected
Parameters
$x
$z
Returns
RegionLoader

Definition at line 218 of file McRegion.php.

References pocketmine\level\Level\chunkHash().

Referenced by pocketmine\level\format\mcregion\McRegion\isChunkGenerated(), pocketmine\level\format\mcregion\McRegion\loadChunk(), and pocketmine\level\format\mcregion\McRegion\saveChunk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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\mcregion\McRegion::isChunkGenerated (   $X,
  $Z 
)
Parameters
int$X
int$Z
Returns
bool

Implements pocketmine\level\format\LevelProvider.

Definition at line 265 of file McRegion.php.

References pocketmine\level\format\mcregion\McRegion\getChunk(), and pocketmine\level\format\mcregion\McRegion\getRegion().

+ Here is the call graph for this function:

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 162 of file McRegion.php.

References pocketmine\level\Level\chunkHash().

Referenced by pocketmine\level\format\mcregion\McRegion\saveChunk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 273 of file McRegion.php.

References pocketmine\level\format\mcregion\McRegion\getChunk().

+ Here is the call graph for this function:

static pocketmine\level\format\mcregion\McRegion::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 58 of file McRegion.php.

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 172 of file McRegion.php.

References pocketmine\level\Level\chunkHash(), and pocketmine\level\format\mcregion\McRegion\getRegion().

Referenced by pocketmine\level\format\mcregion\McRegion\getChunk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

pocketmine\level\format\mcregion\McRegion::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 110 of file McRegion.php.

References pocketmine\level\format\mcregion\McRegion\getChunk(), and pocketmine\level\format\generic\BaseLevelProvider\getLevel().

+ Here is the call graph for this function:

pocketmine\level\format\mcregion\McRegion::saveChunk (   $X,
  $Z 
)
Parameters
int$X
int$Z

Implements pocketmine\level\format\LevelProvider.

Definition at line 202 of file McRegion.php.

References pocketmine\level\format\mcregion\McRegion\getChunk(), pocketmine\level\format\mcregion\McRegion\getRegion(), and pocketmine\level\format\mcregion\McRegion\isChunkLoaded().

+ Here is the call graph for this function:

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 240 of file McRegion.php.

References pocketmine\level\Level\chunkHash(), pocketmine\level\format\FullChunk\setProvider(), and pocketmine\level\format\mcregion\McRegion\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\mcregion\McRegion::unloadChunk (   $X,
  $Z,
  $safe = true 
)
Parameters
int$X
int$Z
bool$safe
Returns
bool

Implements pocketmine\level\format\LevelProvider.

Definition at line 192 of file McRegion.php.

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

Referenced by pocketmine\level\format\mcregion\McRegion\setChunk().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static pocketmine\level\format\mcregion\McRegion::usesChunkSection ( )
static
Returns
bool

Implements pocketmine\level\format\LevelProvider.

Definition at line 54 of file McRegion.php.


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