PocketMine
FullChunk Interface Reference
Inheritance diagram for FullChunk:
Chunk BaseFullChunk BaseChunk BaseChunk Chunk Chunk Chunk Chunk

Public Member Functions

 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)
 
 getBlockExtraData ($x, $y, $z)
 
 setBlockExtraData ($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)
 
 recalculateHeightMap ()
 
 populateSkyLight ()
 
 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)
 
 isLightPopulated ()
 
 setLightPopulated ($value=1)
 
 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 ()
 
 getBlockExtraDataArray ()
 
 getBlockSkyLightArray ()
 
 getBlockLightArray ()
 
 toBinary ()
 
 toFastBinary ()
 
 hasChanged ()
 
 setChanged ($changed=true)
 

Static Public Member Functions

static fromBinary ($data, LevelProvider $provider=null)
 
static fromFastBinary ($data, LevelProvider $provider=null)
 
static getEmptyChunk ($chunkX, $chunkZ, LevelProvider $provider=null)
 

Member Function Documentation

addEntity ( Entity  $entity)
Parameters
Entity$entity

Implemented in BaseFullChunk.

addTile ( Tile  $tile)
Parameters
Tile$tile

Implemented in BaseFullChunk.

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

Implemented in Chunk, Chunk, and Chunk.

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

Implemented in BaseFullChunk, Chunk, Chunk, and Chunk.

getBiomeColor (   $x,
  $z 
)
Parameters
int$x
int$z
Returns
int[] RGB bytes

Implemented in BaseFullChunk.

getBiomeColorArray ( )
Returns
int[]

Implemented in BaseFullChunk.

getBiomeId (   $x,
  $z 
)
Parameters
int$x0-15
int$z0-15
Returns
int 0-255

Implemented in BaseFullChunk.

getBiomeIdArray ( )
Returns
string[]

Implemented in BaseFullChunk.

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

Implemented in Chunk, Chunk, and BaseChunk.

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

Implemented in Chunk, BaseChunk, and Chunk.

getBlockExtraData (   $x,
  $y,
  $z 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
Returns
int (16-bit)

Implemented in BaseFullChunk.

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

Implemented in Chunk, BaseChunk, and Chunk.

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

Implemented in Chunk, Chunk, and BaseChunk.

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

Implemented in Chunk, Chunk, and BaseChunk.

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

Implemented in Chunk, Chunk, and Chunk.

getEntities ( )
Returns
[]

Implemented in BaseFullChunk.

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

Implemented in Chunk, Chunk, and BaseChunk.

getHeightMap (   $x,
  $z 
)
Parameters
int$x0-15
int$z0-15
Returns
int 0-255

Implemented in BaseFullChunk.

getHeightMapArray ( )
Returns
int[]

Implemented in BaseFullChunk.

getHighestBlockAt (   $x,
  $z 
)
Parameters
int$x0-15
int$z0-15
Returns
int 0-127
getProvider ( )
Returns
LevelProvider

Implemented in BaseFullChunk.

getTile (   $x,
  $y,
  $z 
)
Parameters
int$x0-15
int$y0-127
int$z0-15

Implemented in BaseFullChunk.

getTiles ( )
Returns
[]

Implemented in BaseFullChunk.

getX ( )
Returns
int

Implemented in BaseFullChunk.

getZ ( )
Returns
int

Implemented in BaseFullChunk.

hasChanged ( )
Returns
boolean

Implemented in BaseFullChunk.

isLoaded ( )
Returns
bool

Implemented in BaseFullChunk.

load (   $generate = true)

Loads the chunk

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

Implemented in BaseFullChunk, and BaseChunk.

removeEntity ( Entity  $entity)
Parameters
Entity$entity

Implemented in BaseFullChunk.

removeTile ( Tile  $tile)
Parameters
Tile$tile

Implemented in BaseFullChunk.

setBiomeColor (   $x,
  $z,
  $R,
  $G,
  $B 
)
Parameters
int$x0-15
int$z0-15
int$R0-255
int$G0-255
int$B0-255

Implemented in BaseFullChunk.

setBiomeId (   $x,
  $z,
  $biomeId 
)
Parameters
int$x0-15
int$z0-15
int$biomeId0-255

Implemented in BaseFullChunk.

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

Implemented in Chunk, Chunk, and BaseChunk.

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

Implemented in Chunk, BaseChunk, and Chunk.

setBlockExtraData (   $x,
  $y,
  $z,
  $data 
)
Parameters
int$x0-15
int$y0-127
int$z0-15
int$data(16-bit)

Implemented in BaseFullChunk.

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

Implemented in Chunk, BaseChunk, and Chunk.

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

Implemented in Chunk, Chunk, and BaseChunk.

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

Implemented in Chunk, Chunk, and BaseChunk.

setChanged (   $changed = true)
Parameters
bool$changed

Implemented in BaseFullChunk.

setHeightMap (   $x,
  $z,
  $value 
)
Parameters
int$x0-15
int$z0-15
$value0-255

Implemented in BaseFullChunk.

setProvider ( LevelProvider  $provider)
Parameters
LevelProvider$provider

Implemented in BaseFullChunk.

unload (   $save = true,
  $safe = true 
)
Parameters
bool$save
bool$safeIf false, unload the chunk even if players are nearby
Returns
bool

Implemented in BaseFullChunk.


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