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

Public Member Functions

 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
 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)
 
 getBlockIdColumn ($x, $z)
 
 getBlockDataColumn ($x, $z)
 
 getBlockSkyLightColumn ($x, $z)
 
 getBlockLightColumn ($x, $z)
 
 isPopulated ()
 
 setPopulated ($value=1)
 
 isGenerated ()
 
 setGenerated ($value=1)
 
 toBinary ()
 

Static Public Member Functions

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

Protected Member Functions

 __construct ($provider, $x, $z, $blocks, $data, $skyLight, $blockLight, array $biomeColors=[], array $heightMap=[], array $entities=[], array $tiles=[], array $extraData=[])
 
 checkOldBiomes ($data)
 

Protected Attributes

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

Constructor & Destructor Documentation

__construct (   $provider,
  $x,
  $z,
  $blocks,
  $data,
  $skyLight,
  $blockLight,
array  $biomeColors = [],
array  $heightMap = [],
array  $entities = [],
array  $tiles = [],
array  $extraData = [] 
)
protected
Parameters
LevelProvider$provider
int$x
int$z
string$blocks
string$data
string$skyLight
string$blockLight
int[]$biomeColors
int[]$heightMap
Compound[]$entities
Compound[]$tiles

Member Function Documentation

addEntity ( Entity  $entity)
Parameters
Entity$entity

Implements FullChunk.

addTile ( Tile  $tile)
Parameters
Tile$tile

Implements FullChunk.

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

Implements FullChunk.

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

Implements FullChunk.

getBiomeColorArray ( )
Returns
int[]

Implements FullChunk.

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

Implements FullChunk.

getBiomeIdArray ( )
Returns
string[]

Implements FullChunk.

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

Implements FullChunk.

getEntities ( )
Returns
[]

Implements FullChunk.

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

Implements FullChunk.

getHeightMapArray ( )
Returns
int[]

Implements FullChunk.

getLevel ( )
getProvider ( )
Returns
LevelProvider

Implements FullChunk.

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

Implements FullChunk.

getTiles ( )
Returns
[]

Implements FullChunk.

getX ( )
Returns
int

Implements FullChunk.

getZ ( )
Returns
int

Implements FullChunk.

hasChanged ( )
Returns
boolean

Implements FullChunk.

isLoaded ( )
Returns
bool

Implements FullChunk.

load (   $generate = true)

Loads the chunk

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

Implements FullChunk.

removeEntity ( Entity  $entity)
Parameters
Entity$entity

Implements FullChunk.

removeTile ( Tile  $tile)
Parameters
Tile$tile

Implements FullChunk.

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

Implements FullChunk.

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

Implements FullChunk.

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

Implements FullChunk.

setChanged (   $changed = true)
Parameters
bool$changed

Implements FullChunk.

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

Implements FullChunk.

setProvider ( LevelProvider  $provider)
Parameters
LevelProvider$provider

Implements FullChunk.

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

Implements FullChunk.


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