PocketMine
Chunk Class Reference
Inheritance diagram for Chunk:
BaseFullChunk FullChunk

Public Member Functions

 __construct ($level, Compound $nbt=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)
 
 isLightPopulated ()
 
 setLightPopulated ($value=1)
 
 isPopulated ()
 
 setPopulated ($value=1)
 
 isGenerated ()
 
 setGenerated ($value=1)
 
 toFastBinary ()
 
 toBinary ()
 
 getNBT ()
 
- Public Member Functions inherited from BaseFullChunk
 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)
 
 recalculateHeightMap ()
 
 getBlockExtraData ($x, $y, $z)
 
 setBlockExtraData ($x, $y, $z, $data)
 
 populateSkyLight ()
 
 getHighestBlockAt ($x, $z, $cache=true)
 
 addEntity (Entity $entity)
 
 removeEntity (Entity $entity)
 
 addTile (Tile $tile)
 
 removeTile (Tile $tile)
 
 getEntities ()
 
 getTiles ()
 
 getBlockExtraDataArray ()
 
 getTile ($x, $y, $z)
 
 isLoaded ()
 
 load ($generate=true)
 
 unload ($save=true, $safe=true)
 
 getBlockIdArray ()
 
 getBlockDataArray ()
 
 getBlockSkyLightArray ()
 
 getBlockLightArray ()
 
 getBiomeIdArray ()
 
 getBiomeColorArray ()
 
 getHeightMapArray ()
 
 hasChanged ()
 
 setChanged ($changed=true)
 
 toFastBinary ()
 
 isLightPopulated ()
 
 setLightPopulated ($value=1)
 
- Public Member Functions inherited from FullChunk
 getHighestBlockAt ($x, $z)
 

Static Public Member Functions

static fromBinary ($data, LevelProvider $provider=null)
 
static fromFastBinary ($data, LevelProvider $provider=null)
 
static getEmptyChunk ($chunkX, $chunkZ, LevelProvider $provider=null)
 
- Static Public Member Functions inherited from BaseFullChunk
static fromFastBinary ($data, LevelProvider $provider=null)
 

Protected Attributes

 $nbt
 
- Protected Attributes inherited from BaseFullChunk
 $entities = []
 
 $tiles = []
 
 $tileList = []
 
 $biomeColors
 
 $blocks
 
 $data
 
 $skyLight
 
 $blockLight
 
 $heightMap
 
 $NBTtiles
 
 $NBTentities
 
 $extraData = []
 
 $provider
 
 $x
 
 $z
 
 $hasChanged = false
 

Additional Inherited Members

- Protected Member Functions inherited from BaseFullChunk
 __construct ($provider, $x, $z, $blocks, $data, $skyLight, $blockLight, array $biomeColors=[], array $heightMap=[], array $entities=[], array $tiles=[], array $extraData=[])
 
 checkOldBiomes ($data)
 

Member Function Documentation

static fromBinary (   $data,
LevelProvider  $provider = null 
)
static
Parameters
string$data
LevelProvider$provider
Returns
Chunk

Implements FullChunk.

static fromFastBinary (   $data,
LevelProvider  $provider = null 
)
static
Parameters
string$data
LevelProvider$provider
Returns
FullChunk

Implements FullChunk.

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 FullChunk.

getBlockData (   $x,
  $y,
  $z 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
Returns
int 0-15

Implements FullChunk.

getBlockId (   $x,
  $y,
  $z 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
Returns
int 0-255

Implements FullChunk.

getBlockLight (   $x,
  $y,
  $z 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
Returns
int 0-15

Implements FullChunk.

getBlockSkyLight (   $x,
  $y,
  $z 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
Returns
int 0-15

Implements FullChunk.

static getEmptyChunk (   $chunkX,
  $chunkZ,
LevelProvider  $provider = null 
)
static
Parameters
int$chunkX
int$chunkZ
LevelProvider$provider
Returns
Chunk

Implements FullChunk.

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 FullChunk.

getNBT ( )
Returns
Compound
isGenerated ( )
Returns
bool

Implements FullChunk.

isPopulated ( )
Returns
bool

Implements FullChunk.

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 FullChunk.

setBlockData (   $x,
  $y,
  $z,
  $data 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
int$data0-15

Implements FullChunk.

setBlockId (   $x,
  $y,
  $z,
  $id 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
int$id0-255

Implements FullChunk.

setBlockLight (   $x,
  $y,
  $z,
  $level 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
int$level0-15

Implements FullChunk.

setBlockSkyLight (   $x,
  $y,
  $z,
  $level 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
int$level0-15

Implements FullChunk.

setGenerated (   $value = 1)
Parameters
int$value

Implements FullChunk.

setPopulated (   $value = 1)
Parameters
int$value

Implements FullChunk.


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