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

Public Member Functions

 __construct ($level, $chunkX, $chunkZ, $terrain, array $entityData=null, array $tileData=null)
 
 getBlockId ($x, $y, $z)
 
 setBlockId ($x, $y, $z, $id)
 
 getBlockData ($x, $y, $z)
 
 setBlockData ($x, $y, $z, $data)
 
 getFullBlock ($x, $y, $z)
 
 getBlock ($x, $y, $z, &$blockId, &$meta=null)
 
 setBlock ($x, $y, $z, $blockId=null, $meta=null)
 
 getBlockSkyLight ($x, $y, $z)
 
 setBlockSkyLight ($x, $y, $z, $level)
 
 getBlockLight ($x, $y, $z)
 
 setBlockLight ($x, $y, $z, $level)
 
 getBlockIdColumn ($x, $z)
 
 getBlockDataColumn ($x, $z)
 
 getBlockSkyLightColumn ($x, $z)
 
 getBlockLightColumn ($x, $z)
 
 isPopulated ()
 
 setPopulated ($value=1)
 
 isGenerated ()
 
 setGenerated ($value=1)
 
 toBinary ($saveExtra=false)
 
 initChunk ()
 
 getX ()
 
 getZ ()
 
 setX ($x)
 
 setZ ($z)
 
 getLevel ()
 
 getProvider ()
 
 setProvider (LevelProvider $provider)
 
 getBiomeId ($x, $z)
 
 setBiomeId ($x, $z, $biomeId)
 
 getBiomeColor ($x, $z)
 
 setBiomeColor ($x, $z, $R, $G, $B)
 
 getHeightMap ($x, $z)
 
 setHeightMap ($x, $z, $value)
 
 getHighestBlockAt ($x, $z)
 
 addEntity (Entity $entity)
 
 removeEntity (Entity $entity)
 
 addTile (Tile $tile)
 
 removeTile (Tile $tile)
 
 getEntities ()
 
 getTiles ()
 
 getTile ($x, $y, $z)
 
 isLoaded ()
 
 load ($generate=true)
 
 unload ($save=true, $safe=true)
 
 getBlockIdArray ()
 
 getBlockDataArray ()
 
 getBlockSkyLightArray ()
 
 getBlockLightArray ()
 
 getBiomeIdArray ()
 
 getBiomeColorArray ()
 
 getHeightMapArray ()
 
 hasChanged ()
 
 setChanged ($changed=true)
 
 toBinary ()
 

Static Public Member Functions

static fromBinary ($data, LevelProvider $provider=null)
 

Protected Attributes

 $isPopulated = false
 
 $isGenerated = false
 
 $entities = []
 
 $tiles = []
 
 $tileList = []
 
 $biomeIds
 
 $biomeColors
 
 $blocks
 
 $data
 
 $skyLight
 
 $blockLight
 
 $heightMap
 
 $NBTtiles
 
 $NBTentities
 
 $provider
 
 $x
 
 $z
 
 $hasChanged = false
 

Detailed Description

Definition at line 30 of file leveldb/Chunk.php.

Member Function Documentation

pocketmine\level\format\generic\BaseFullChunk::addEntity ( Entity  $entity)
inherited
Parameters
Entity$entity

Implements pocketmine\level\format\FullChunk.

Definition at line 245 of file BaseFullChunk.php.

References pocketmine\level\format\generic\BaseFullChunk\hasChanged().

+ Here is the call graph for this function:

pocketmine\level\format\generic\BaseFullChunk::addTile ( Tile  $tile)
inherited
Parameters
Tile$tile

Implements pocketmine\level\format\FullChunk.

Definition at line 255 of file BaseFullChunk.php.

References pocketmine\level\format\generic\BaseFullChunk\hasChanged().

+ Here is the call graph for this function:

static pocketmine\level\format\leveldb\Chunk::fromBinary (   $data,
LevelProvider  $provider = null 
)
static
Parameters
string$data
LevelProvider$provider
Returns
Chunk

Implements pocketmine\level\format\FullChunk.

Definition at line 230 of file leveldb/Chunk.php.

pocketmine\level\format\generic\BaseFullChunk::getBiomeColor (   $x,
  $z 
)
inherited
Parameters
int$x
int$z
Returns
int[] RGB bytes

Implements pocketmine\level\format\FullChunk.

Definition at line 215 of file BaseFullChunk.php.

pocketmine\level\format\generic\BaseFullChunk::getBiomeColorArray ( )
inherited
Returns
int[]

Implements pocketmine\level\format\FullChunk.

Definition at line 340 of file BaseFullChunk.php.

pocketmine\level\format\generic\BaseFullChunk::getBiomeId (   $x,
  $z 
)
inherited
Parameters
int$x0-15
int$z0-15
Returns
int 0-255

Implements pocketmine\level\format\FullChunk.

Definition at line 206 of file BaseFullChunk.php.

pocketmine\level\format\generic\BaseFullChunk::getBiomeIdArray ( )
inherited
Returns
string[]

Implements pocketmine\level\format\FullChunk.

Definition at line 336 of file BaseFullChunk.php.

pocketmine\level\format\leveldb\Chunk::getBlock (   $x,
  $y,
  $z,
$blockId,
$meta = null 
)

Modifies $blockId and $meta

Deprecated:
Parameters
int$x0-15
int$y0-127
int$z0-15
int&$blockId
int&$meta

Implements pocketmine\level\format\FullChunk.

Definition at line 98 of file leveldb/Chunk.php.

References pocketmine\level\format\leveldb\Chunk\getFullBlock().

+ Here is the call graph for this function:

pocketmine\level\format\leveldb\Chunk::getBlockData (   $x,
  $y,
  $z 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
Returns
int 0-15

Implements pocketmine\level\format\FullChunk.

Definition at line 69 of file leveldb/Chunk.php.

pocketmine\level\format\leveldb\Chunk::getBlockId (   $x,
  $y,
  $z 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
Returns
int 0-255

Implements pocketmine\level\format\FullChunk.

Definition at line 60 of file leveldb/Chunk.php.

pocketmine\level\format\leveldb\Chunk::getBlockLight (   $x,
  $y,
  $z 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
Returns
int 0-15

Implements pocketmine\level\format\FullChunk.

Definition at line 160 of file leveldb/Chunk.php.

pocketmine\level\format\leveldb\Chunk::getBlockSkyLight (   $x,
  $y,
  $z 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
Returns
int 0-15

Implements pocketmine\level\format\FullChunk.

Definition at line 140 of file leveldb/Chunk.php.

pocketmine\level\format\generic\BaseFullChunk::getEntities ( )
inherited
Returns
[]

Implements pocketmine\level\format\FullChunk.

Definition at line 270 of file BaseFullChunk.php.

Referenced by pocketmine\level\format\generic\BaseFullChunk\unload().

+ Here is the caller graph for this function:

pocketmine\level\format\leveldb\Chunk::getFullBlock (   $x,
  $y,
  $z 
)

Gets block and meta in one go

Parameters
int$x0-15
int$y0-15
int$z0-15
Returns
int bitmap, (id << 4) | data

Implements pocketmine\level\format\FullChunk.

Definition at line 89 of file leveldb/Chunk.php.

Referenced by pocketmine\level\format\leveldb\Chunk\getBlock().

+ Here is the caller graph for this function:

pocketmine\level\format\generic\BaseFullChunk::getHeightMap (   $x,
  $z 
)
inherited
Parameters
int$x0-15
int$z0-15
Returns
int 0-255

Implements pocketmine\level\format\FullChunk.

Definition at line 226 of file BaseFullChunk.php.

pocketmine\level\format\generic\BaseFullChunk::getHeightMapArray ( )
inherited
Returns
int[]

Implements pocketmine\level\format\FullChunk.

Definition at line 344 of file BaseFullChunk.php.

pocketmine\level\format\generic\BaseFullChunk::getHighestBlockAt (   $x,
  $z 
)
inherited
Parameters
int$x0-15
int$z0-15
Returns
int 0-127

Implements pocketmine\level\format\FullChunk.

Definition at line 234 of file BaseFullChunk.php.

pocketmine\level\format\generic\BaseFullChunk::getLevel ( )
inherited
Returns
LevelProvider
Deprecated:

Definition at line 191 of file BaseFullChunk.php.

References pocketmine\level\format\generic\BaseFullChunk\getProvider().

+ Here is the call graph for this function:

pocketmine\level\format\generic\BaseFullChunk::getTile (   $x,
  $y,
  $z 
)
inherited
Parameters
int$x0-15
int$y0-127
int$z0-15

Implements pocketmine\level\format\FullChunk.

Definition at line 278 of file BaseFullChunk.php.

pocketmine\level\format\generic\BaseFullChunk::getTiles ( )
inherited
Returns
[]

Implements pocketmine\level\format\FullChunk.

Definition at line 274 of file BaseFullChunk.php.

Referenced by pocketmine\level\format\generic\BaseFullChunk\unload().

+ Here is the caller graph for this function:

pocketmine\level\format\generic\BaseFullChunk::getX ( )
inherited
Returns
int

Implements pocketmine\level\format\FullChunk.

Definition at line 170 of file BaseFullChunk.php.

Referenced by pocketmine\level\format\generic\BaseFullChunk\isLoaded(), pocketmine\level\format\generic\BaseChunk\load(), pocketmine\level\format\generic\BaseFullChunk\load(), and pocketmine\level\format\generic\BaseFullChunk\unload().

+ Here is the caller graph for this function:

pocketmine\level\format\generic\BaseFullChunk::getZ ( )
inherited
Returns
int

Implements pocketmine\level\format\FullChunk.

Definition at line 174 of file BaseFullChunk.php.

Referenced by pocketmine\level\format\generic\BaseFullChunk\isLoaded(), pocketmine\level\format\generic\BaseChunk\load(), pocketmine\level\format\generic\BaseFullChunk\load(), and pocketmine\level\format\generic\BaseFullChunk\unload().

+ Here is the caller graph for this function:

pocketmine\level\format\generic\BaseFullChunk::hasChanged ( )
inherited
Returns
boolean

Implements pocketmine\level\format\FullChunk.

Definition at line 348 of file BaseFullChunk.php.

Referenced by pocketmine\level\format\generic\BaseFullChunk\addEntity(), pocketmine\level\format\generic\BaseFullChunk\addTile(), pocketmine\level\format\generic\BaseFullChunk\removeEntity(), pocketmine\level\format\generic\BaseFullChunk\removeTile(), pocketmine\level\format\generic\BaseFullChunk\setBiomeColor(), pocketmine\level\format\generic\BaseFullChunk\setBiomeId(), pocketmine\level\format\generic\BaseChunk\setBlock(), pocketmine\level\format\leveldb\Chunk\setBlock(), pocketmine\level\format\mcregion\Chunk\setBlock(), pocketmine\level\format\leveldb\Chunk\setBlockData(), pocketmine\level\format\mcregion\Chunk\setBlockData(), pocketmine\level\format\generic\BaseChunk\setBlockData(), pocketmine\level\format\leveldb\Chunk\setBlockId(), pocketmine\level\format\mcregion\Chunk\setBlockId(), pocketmine\level\format\generic\BaseChunk\setBlockId(), pocketmine\level\format\generic\BaseChunk\setBlockLight(), pocketmine\level\format\leveldb\Chunk\setBlockLight(), pocketmine\level\format\mcregion\Chunk\setBlockLight(), pocketmine\level\format\generic\BaseChunk\setBlockSkyLight(), pocketmine\level\format\leveldb\Chunk\setBlockSkyLight(), pocketmine\level\format\mcregion\Chunk\setBlockSkyLight(), pocketmine\level\format\generic\BaseFullChunk\setChanged(), pocketmine\level\format\generic\BaseChunk\setSection(), and pocketmine\level\format\generic\BaseFullChunk\unload().

+ Here is the caller graph for this function:

pocketmine\level\format\leveldb\Chunk::isGenerated ( )
Returns
bool

Implements pocketmine\level\format\FullChunk.

Definition at line 213 of file leveldb/Chunk.php.

Referenced by pocketmine\level\format\leveldb\Chunk\setGenerated().

+ Here is the caller graph for this function:

pocketmine\level\format\generic\BaseFullChunk::isLoaded ( )
inherited
Returns
bool

Implements pocketmine\level\format\FullChunk.

Definition at line 283 of file BaseFullChunk.php.

References pocketmine\level\format\generic\BaseFullChunk\getProvider(), pocketmine\level\format\generic\BaseFullChunk\getX(), and pocketmine\level\format\generic\BaseFullChunk\getZ().

+ Here is the call graph for this function:

pocketmine\level\format\leveldb\Chunk::isPopulated ( )
Returns
bool

Implements pocketmine\level\format\FullChunk.

Definition at line 199 of file leveldb/Chunk.php.

Referenced by pocketmine\level\format\leveldb\Chunk\setPopulated().

+ Here is the caller graph for this function:

pocketmine\level\format\generic\BaseFullChunk::load (   $generate = true)
inherited

Loads the chunk

Parameters
bool$generateIf the chunk does not exist, generate it
Returns
bool

Implements pocketmine\level\format\FullChunk.

Definition at line 287 of file BaseFullChunk.php.

References pocketmine\level\format\generic\BaseFullChunk\getProvider(), pocketmine\level\format\generic\BaseFullChunk\getX(), and pocketmine\level\format\generic\BaseFullChunk\getZ().

+ Here is the call graph for this function:

pocketmine\level\format\generic\BaseFullChunk::removeEntity ( Entity  $entity)
inherited
Parameters
Entity$entity

Implements pocketmine\level\format\FullChunk.

Definition at line 250 of file BaseFullChunk.php.

References pocketmine\level\format\generic\BaseFullChunk\hasChanged().

+ Here is the call graph for this function:

pocketmine\level\format\generic\BaseFullChunk::removeTile ( Tile  $tile)
inherited
Parameters
Tile$tile

Implements pocketmine\level\format\FullChunk.

Definition at line 264 of file BaseFullChunk.php.

References pocketmine\level\format\generic\BaseFullChunk\hasChanged().

+ Here is the call graph for this function:

pocketmine\level\format\generic\BaseFullChunk::setBiomeColor (   $x,
  $z,
  $R,
  $G,
  $B 
)
inherited
Parameters
int$x0-15
int$z0-15
int$R0-255
int$G0-255
int$B0-255

Implements pocketmine\level\format\FullChunk.

Definition at line 221 of file BaseFullChunk.php.

References pocketmine\level\format\generic\BaseFullChunk\hasChanged().

+ Here is the call graph for this function:

pocketmine\level\format\generic\BaseFullChunk::setBiomeId (   $x,
  $z,
  $biomeId 
)
inherited
Parameters
int$x0-15
int$z0-15
int$biomeId0-255

Implements pocketmine\level\format\FullChunk.

Definition at line 210 of file BaseFullChunk.php.

References pocketmine\level\format\generic\BaseFullChunk\hasChanged().

+ Here is the call graph for this function:

pocketmine\level\format\leveldb\Chunk::setBlock (   $x,
  $y,
  $z,
  $blockId = null,
  $meta = null 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
int$blockId,ifnull, do not change
int$meta0-15, if null, do not change

Implements pocketmine\level\format\FullChunk.

Definition at line 104 of file leveldb/Chunk.php.

References pocketmine\level\format\generic\BaseFullChunk\hasChanged().

+ Here is the call graph for this function:

pocketmine\level\format\leveldb\Chunk::setBlockData (   $x,
  $y,
  $z,
  $data 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
int$data0-15

Implements pocketmine\level\format\FullChunk.

Definition at line 78 of file leveldb/Chunk.php.

References pocketmine\level\format\generic\BaseFullChunk\hasChanged().

+ Here is the call graph for this function:

pocketmine\level\format\leveldb\Chunk::setBlockId (   $x,
  $y,
  $z,
  $id 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
int$id0-255

Implements pocketmine\level\format\FullChunk.

Definition at line 64 of file leveldb/Chunk.php.

References pocketmine\level\format\generic\BaseFullChunk\hasChanged().

+ Here is the call graph for this function:

pocketmine\level\format\leveldb\Chunk::setBlockLight (   $x,
  $y,
  $z,
  $level 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
int$level0-15

Implements pocketmine\level\format\FullChunk.

Definition at line 169 of file leveldb/Chunk.php.

References pocketmine\level\format\generic\BaseFullChunk\hasChanged().

+ Here is the call graph for this function:

pocketmine\level\format\leveldb\Chunk::setBlockSkyLight (   $x,
  $y,
  $z,
  $level 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
int$level0-15

Implements pocketmine\level\format\FullChunk.

Definition at line 149 of file leveldb/Chunk.php.

References pocketmine\level\format\generic\BaseFullChunk\hasChanged().

+ Here is the call graph for this function:

pocketmine\level\format\generic\BaseFullChunk::setChanged (   $changed = true)
inherited
Parameters
bool$changed

Implements pocketmine\level\format\FullChunk.

Definition at line 352 of file BaseFullChunk.php.

References pocketmine\level\format\generic\BaseFullChunk\hasChanged().

+ Here is the call graph for this function:

pocketmine\level\format\leveldb\Chunk::setGenerated (   $value = 1)
Parameters
int$value

Implements pocketmine\level\format\FullChunk.

Definition at line 220 of file leveldb/Chunk.php.

References pocketmine\level\format\leveldb\Chunk\isGenerated().

+ Here is the call graph for this function:

pocketmine\level\format\generic\BaseFullChunk::setHeightMap (   $x,
  $z,
  $value 
)
inherited
Parameters
int$x0-15
int$z0-15
$value0-255

Implements pocketmine\level\format\FullChunk.

Definition at line 230 of file BaseFullChunk.php.

pocketmine\level\format\leveldb\Chunk::setPopulated (   $value = 1)
Parameters
int$value

Implements pocketmine\level\format\FullChunk.

Definition at line 206 of file leveldb/Chunk.php.

References pocketmine\level\format\leveldb\Chunk\isPopulated().

+ Here is the call graph for this function:

pocketmine\level\format\generic\BaseFullChunk::setProvider ( LevelProvider  $provider)
inherited
Parameters
LevelProvider$provider

Implements pocketmine\level\format\FullChunk.

Definition at line 202 of file BaseFullChunk.php.

pocketmine\level\format\generic\BaseFullChunk::unload (   $save = true,
  $safe = true 
)
inherited
Parameters
bool$save
bool$safeIf false, unload the chunk even if players are nearby
Returns
bool

Implements pocketmine\level\format\FullChunk.

Definition at line 291 of file BaseFullChunk.php.

References pocketmine\level\format\generic\BaseFullChunk\getEntities(), pocketmine\level\format\generic\BaseFullChunk\getProvider(), pocketmine\level\format\generic\BaseFullChunk\getTiles(), pocketmine\level\format\generic\BaseFullChunk\getX(), pocketmine\level\format\generic\BaseFullChunk\getZ(), and pocketmine\level\format\generic\BaseFullChunk\hasChanged().

+ Here is the call graph for this function:


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