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

Public Member Functions

 requestChunkTask ($x, $z)
 
 getChunk ($chunkX, $chunkZ, $create=false)
 
 setChunk ($chunkX, $chunkZ, FullChunk $chunk)
 
 isChunkGenerated ($chunkX, $chunkZ)
 
 unloadChunks ()
 
 getGenerator ()
 
 getGeneratorOptions ()
 
 getLoadedChunks ()
 
 isChunkLoaded ($x, $z)
 
 saveChunks ()
 
 loadChunk ($chunkX, $chunkZ, $create=false)
 
 unloadChunk ($x, $z, $safe=true)
 
 saveChunk ($x, $z)
 
 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 createChunkSection ($Y)
 
static generate ($path, $name, $seed, $generator, array $options=[])
 
static getRegionIndex ($chunkX, $chunkZ, &$x, &$z)
 

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 32 of file Anvil.php.

Member Function Documentation

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 108 of file Anvil.php.

static pocketmine\level\format\mcregion\McRegion::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

Implements pocketmine\level\format\LevelProvider.

Definition at line 74 of file McRegion.php.

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 89 of file Anvil.php.

Referenced by pocketmine\level\format\anvil\Anvil\isChunkGenerated().

+ Here is the caller graph for this function:

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

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 ( )
inherited
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 ( )
inherited
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\anvil\Anvil::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 40 of file Anvil.php.

static pocketmine\level\format\anvil\Anvil::getProviderOrder ( )
static
Returns
int

Implements pocketmine\level\format\LevelProvider.

Definition at line 44 of file Anvil.php.

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

Definition at line 78 of file Anvil.php.

References pocketmine\level\Level\chunkHash().

Referenced by pocketmine\level\format\anvil\Anvil\isChunkGenerated().

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

Implements pocketmine\level\format\LevelProvider.

Definition at line 118 of file Anvil.php.

References pocketmine\level\format\anvil\Anvil\getChunk(), and pocketmine\level\format\anvil\Anvil\getRegion().

+ Here is the call graph for this function:

pocketmine\level\format\mcregion\McRegion::isChunkLoaded (   $X,
  $Z 
)
inherited
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 
)
inherited
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\anvil\Anvil::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 52 of file Anvil.php.

pocketmine\level\format\mcregion\McRegion::loadChunk (   $X,
  $Z,
  $create = false 
)
inherited
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\anvil\Anvil::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 68 of file Anvil.php.

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

+ Here is the call graph for this function:

pocketmine\level\format\mcregion\McRegion::saveChunk (   $X,
  $Z 
)
inherited
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\anvil\Anvil::setChunk (   $chunkX,
  $chunkZ,
FullChunk  $chunk 
)
Parameters
int$chunkX
int$chunkZ
FullChunk$chunk
Returns
mixed

Implements pocketmine\level\format\LevelProvider.

Definition at line 93 of file Anvil.php.

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

+ 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 
)
inherited
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\anvil\Anvil::usesChunkSection ( )
static
Returns
bool

Implements pocketmine\level\format\LevelProvider.

Definition at line 48 of file Anvil.php.


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