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

Public Member Functions

 isSectionEmpty ($fY)
 
 getSection ($fY)
 
 setSection ($fY, ChunkSection $section)
 
 getSections ()
 
 getX ()
 
 getZ ()
 
 setX ($x)
 
 setZ ($z)
 
 getProvider ()
 
 setProvider (LevelProvider $provider)
 
 getBlock ($x, $y, $z, &$blockId, &$meta=null)
 
 getFullBlock ($x, $y, $z)
 
 setBlock ($x, $y, $z, $blockId=null, $meta=null)
 
 getBlockId ($x, $y, $z)
 
 setBlockId ($x, $y, $z, $id)
 
 getBlockData ($x, $y, $z)
 
 setBlockData ($x, $y, $z, $data)
 
 getBlockSkyLight ($x, $y, $z)
 
 setBlockSkyLight ($x, $y, $z, $level)
 
 getBlockLight ($x, $y, $z)
 
 setBlockLight ($x, $y, $z, $level)
 
 getHighestBlockAt ($x, $z)
 
 getHeightMap ($x, $z)
 
 setHeightMap ($x, $z, $value)
 
 getBiomeId ($x, $z)
 
 setBiomeId ($x, $z, $biomeId)
 
 getBiomeColor ($x, $z)
 
 getBlockIdColumn ($x, $z)
 
 getBlockDataColumn ($x, $z)
 
 getBlockSkyLightColumn ($x, $z)
 
 getBlockLightColumn ($x, $z)
 
 setBiomeColor ($x, $z, $R, $G, $B)
 
 isPopulated ()
 
 setPopulated ($value=1)
 
 isGenerated ()
 
 setGenerated ($value=1)
 
 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)
 
 initChunk ()
 
 getBiomeIdArray ()
 
 getBiomeColorArray ()
 
 getHeightMapArray ()
 
 getBlockIdArray ()
 
 getBlockDataArray ()
 
 getBlockSkyLightArray ()
 
 getBlockLightArray ()
 
 toBinary ()
 
 hasChanged ()
 
 setChanged ($changed=true)
 

Static Public Member Functions

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

Public Attributes

const SECTION_COUNT = 8
 

Detailed Description

Definition at line 24 of file Chunk.php.

Member Function Documentation

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

Implemented in pocketmine\level\format\generic\BaseFullChunk.

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

Implemented in pocketmine\level\format\generic\BaseFullChunk.

static pocketmine\level\format\FullChunk::fromBinary (   $data,
LevelProvider  $provider = null 
)
staticinherited
pocketmine\level\format\FullChunk::getBiomeColor (   $x,
  $z 
)
inherited
Parameters
int$x
int$z
Returns
int[] RGB bytes

Implemented in pocketmine\level\format\generic\BaseFullChunk.

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

Implemented in pocketmine\level\format\generic\BaseFullChunk.

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

Implemented in pocketmine\level\format\generic\BaseFullChunk.

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

Implemented in pocketmine\level\format\generic\BaseFullChunk.

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

Modifies $blockId and $meta

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

Implemented in pocketmine\level\format\mcregion\Chunk, pocketmine\level\format\leveldb\Chunk, and pocketmine\level\format\generic\BaseChunk.

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

Implemented in pocketmine\level\format\generic\BaseChunk, pocketmine\level\format\mcregion\Chunk, and pocketmine\level\format\leveldb\Chunk.

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

Implemented in pocketmine\level\format\generic\BaseChunk, pocketmine\level\format\mcregion\Chunk, and pocketmine\level\format\leveldb\Chunk.

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

Implemented in pocketmine\level\format\mcregion\Chunk, pocketmine\level\format\leveldb\Chunk, and pocketmine\level\format\generic\BaseChunk.

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

Implemented in pocketmine\level\format\mcregion\Chunk, pocketmine\level\format\generic\BaseChunk, and pocketmine\level\format\leveldb\Chunk.

pocketmine\level\format\FullChunk::getEntities ( )
inherited
pocketmine\level\format\FullChunk::getFullBlock (   $x,
  $y,
  $z 
)
inherited

Gets block and meta in one go

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

Implemented in pocketmine\level\format\mcregion\Chunk, pocketmine\level\format\generic\BaseChunk, and pocketmine\level\format\leveldb\Chunk.

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

Implemented in pocketmine\level\format\generic\BaseFullChunk.

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

Implemented in pocketmine\level\format\generic\BaseFullChunk.

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

Implemented in pocketmine\level\format\generic\BaseFullChunk.

pocketmine\level\format\FullChunk::getProvider ( )
inherited
Returns
LevelProvider

Implemented in pocketmine\level\format\generic\BaseFullChunk.

Referenced by pocketmine\event\level\ChunkEvent\__construct().

+ Here is the caller graph for this function:

pocketmine\level\format\Chunk::getSection (   $fY)
Parameters
int$fY0-7
Returns
ChunkSection

Implemented in pocketmine\level\format\generic\BaseChunk.

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

Implemented in pocketmine\level\format\generic\BaseFullChunk.

pocketmine\level\format\FullChunk::getTiles ( )
inherited
pocketmine\level\format\FullChunk::getX ( )
inherited
pocketmine\level\format\FullChunk::getZ ( )
inherited
pocketmine\level\format\FullChunk::hasChanged ( )
inherited
Returns
boolean

Implemented in pocketmine\level\format\generic\BaseFullChunk.

pocketmine\level\format\FullChunk::isLoaded ( )
inherited
Returns
bool

Implemented in pocketmine\level\format\generic\BaseFullChunk.

pocketmine\level\format\Chunk::isSectionEmpty (   $fY)

Tests whether a section (mini-chunk) is empty

Parameters
$fY0-7, (Y / 16)
Returns
bool

Implemented in pocketmine\level\format\generic\BaseChunk.

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

Loads the chunk

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

Implemented in pocketmine\level\format\generic\BaseFullChunk, and pocketmine\level\format\generic\BaseChunk.

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

Implemented in pocketmine\level\format\generic\BaseFullChunk.

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

Implemented in pocketmine\level\format\generic\BaseFullChunk.

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

Implemented in pocketmine\level\format\generic\BaseFullChunk.

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

Implemented in pocketmine\level\format\generic\BaseFullChunk.

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

Implemented in pocketmine\level\format\mcregion\Chunk, pocketmine\level\format\leveldb\Chunk, and pocketmine\level\format\generic\BaseChunk.

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

Implemented in pocketmine\level\format\generic\BaseChunk, pocketmine\level\format\mcregion\Chunk, and pocketmine\level\format\leveldb\Chunk.

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

Implemented in pocketmine\level\format\generic\BaseChunk, pocketmine\level\format\mcregion\Chunk, and pocketmine\level\format\leveldb\Chunk.

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

Implemented in pocketmine\level\format\mcregion\Chunk, pocketmine\level\format\leveldb\Chunk, and pocketmine\level\format\generic\BaseChunk.

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

Implemented in pocketmine\level\format\mcregion\Chunk, pocketmine\level\format\leveldb\Chunk, and pocketmine\level\format\generic\BaseChunk.

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

Implemented in pocketmine\level\format\generic\BaseFullChunk.

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

Implemented in pocketmine\level\format\generic\BaseFullChunk.

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

Implemented in pocketmine\level\format\generic\BaseFullChunk.

Referenced by pocketmine\level\format\anvil\Anvil\setChunk(), pocketmine\level\format\mcregion\McRegion\setChunk(), and pocketmine\level\format\leveldb\LevelDB\setChunk().

+ Here is the caller graph for this function:

pocketmine\level\format\Chunk::setSection (   $fY,
ChunkSection  $section 
)
Parameters
int$fY0-7
ChunkSection$section
Returns
boolean

Implemented in pocketmine\level\format\generic\BaseChunk.

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

Implemented in pocketmine\level\format\generic\BaseFullChunk.

Referenced by pocketmine\level\format\mcregion\McRegion\unloadChunk(), and pocketmine\level\format\leveldb\LevelDB\unloadChunk().

+ Here is the caller graph for this function:


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