|
GenisysPro
for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
|
Public Member Functions | |
| __construct (int $chunkX, int $chunkZ, array $subChunks=[], array $entities=[], array $tiles=[], string $biomeIds="", array $heightMap=[]) | |
| getX () | |
| getZ () | |
| setX (int $x) | |
| setZ (int $z) | |
| getHeight () | |
| getFullBlock (int $x, int $y, int $z) | |
| setBlock (int $x, int $y, int $z, $blockId=null, $meta=null) | |
| getBlockId (int $x, int $y, int $z) | |
| setBlockId (int $x, int $y, int $z, int $id) | |
| getBlockData (int $x, int $y, int $z) | |
| setBlockData (int $x, int $y, int $z, int $data) | |
| getBlockExtraData (int $x, int $y, int $z) | |
| setBlockExtraData (int $x, int $y, int $z, int $data) | |
| getBlockSkyLight (int $x, int $y, int $z) | |
| setBlockSkyLight (int $x, int $y, int $z, int $level) | |
| getBlockLight (int $x, int $y, int $z) | |
| setBlockLight (int $x, int $y, int $z, int $level) | |
| getHighestBlockAt (int $x, int $z) | |
| getHeightMap (int $x, int $z) | |
| setHeightMap (int $x, int $z, int $value) | |
| recalculateHeightMap () | |
| recalculateHeightMapColumn (int $x, int $z) | |
| populateSkyLight () | |
| getBiomeId (int $x, int $z) | |
| setBiomeId (int $x, int $z, int $biomeId) | |
| getBlockIdColumn (int $x, int $z) | |
| getBlockDataColumn (int $x, int $z) | |
| getBlockSkyLightColumn (int $x, int $z) | |
| getBlockLightColumn (int $x, int $z) | |
| isLightPopulated () | |
| setLightPopulated (bool $value=true) | |
| isPopulated () | |
| setPopulated (bool $value=true) | |
| isGenerated () | |
| setGenerated (bool $value=true) | |
| addEntity (Entity $entity) | |
| removeEntity (Entity $entity) | |
| addTile (Tile $tile) | |
| removeTile (Tile $tile) | |
| getEntities () | |
| getTiles () | |
| getTile (int $x, int $y, int $z) | |
| unload (bool $safe=true) | |
| initChunk (Level $level) | |
| getBiomeIdArray () | |
| getHeightMapArray () | |
| getBlockExtraDataArray () | |
| hasChanged () | |
| setChanged (bool $value=true) | |
| getSubChunk (int $y, bool $generateNew=false) | |
| setSubChunk (int $y, SubChunk $subChunk=null, bool $allowEmpty=false) | |
| getSubChunks () | |
| getHighestSubChunkIndex () | |
| getSubChunkSendCount () | |
| pruneEmptySubChunks () | |
| networkSerialize () | |
| fastSerialize () | |
Static Public Member Functions | |
| static | fastDeserialize (string $data) |
| static | getEmptyChunk (int $x, int $z) |
| static | chunkBlockHash (int $x, int $y, int $z) |
Data Fields | |
| const | MAX_SUBCHUNKS = 16 |
Protected Attributes | |
| $x | |
| $z | |
| $hasChanged = false | |
| $isInit = false | |
| $lightPopulated = false | |
| $terrainGenerated = false | |
| $terrainPopulated = false | |
| $height = Chunk::MAX_SUBCHUNKS | |
| $subChunks = [] | |
| $emptySubChunk = null | |
| $tiles = [] | |
| $tileList = [] | |
| $entities = [] | |
| $heightMap = [] | |
| $biomeIds | |
| $extraData = [] | |
| $NBTtiles = [] | |
| $NBTentities = [] | |
| __construct | ( | int | $chunkX, |
| int | $chunkZ, | ||
| array | $subChunks = [], |
||
| array | $entities = [], |
||
| array | $tiles = [], |
||
| string | $biomeIds = "", |
||
| array | $heightMap = [] |
||
| ) |
| int | $chunkX | |
| int | $chunkZ | |
| SubChunk[] | $subChunks | |
| CompoundTag[] | $entities | |
| CompoundTag[] | $tiles | |
| string | $biomeIds | |
| int[] | $heightMap |
| addEntity | ( | Entity | $entity | ) |
| Entity | $entity |
| addTile | ( | Tile | $tile | ) |
|
static |
|
static |
| fastSerialize | ( | ) |
| getBiomeId | ( | int | $x, |
| int | $z | ||
| ) |
| getBiomeIdArray | ( | ) |
| getBlockData | ( | int | $x, |
| int | $y, | ||
| int | $z | ||
| ) |
Returns the block meta value at the specified chunk block coordinates
| int | $x | 0-15 |
| int | $y | |
| int | $z | 0-15 |
| getBlockDataColumn | ( | int | $x, |
| int | $z | ||
| ) |
Returns a column of block meta values from bottom to top at the specified X/Z chunk block coordinates.
| int | $x | 0-15 |
| int | $z | 0-15 |
| getBlockExtraData | ( | int | $x, |
| int | $y, | ||
| int | $z | ||
| ) |
Returns the raw block extra data value at the specified chunk block coordinates, or 0 if no data exists
| int | $x | 0-15 |
| int | $y | |
| int | $z | 0-15 |
| getBlockExtraDataArray | ( | ) |
| getBlockId | ( | int | $x, |
| int | $y, | ||
| int | $z | ||
| ) |
Returns the block ID at the specified chunk block coordinates
| int | $x | 0-15 |
| int | $y | |
| int | $z | 0-15 |
| getBlockIdColumn | ( | int | $x, |
| int | $z | ||
| ) |
| getBlockLight | ( | int | $x, |
| int | $y, | ||
| int | $z | ||
| ) |
Returns the block light level at the specified chunk block coordinates
| int | $x | 0-15 |
| int | $y | 0-15 |
| int | $z | 0-15 |
| getBlockLightColumn | ( | int | $x, |
| int | $z | ||
| ) |
Returns a column of block light values from bottom to top at the specified X/Z chunk block coordinates.
| int | $x | 0-15 |
| int | $z | 0-15 |
| getBlockSkyLight | ( | int | $x, |
| int | $y, | ||
| int | $z | ||
| ) |
Returns the sky light level at the specified chunk block coordinates
| int | $x | 0-15 |
| int | $y | |
| int | $z | 0-15 |
| getBlockSkyLightColumn | ( | int | $x, |
| int | $z | ||
| ) |
Returns a column of sky light values from bottom to top at the specified X/Z chunk block coordinates.
| int | $x | 0-15 |
| int | $z | 0-15 |
| getEntities | ( | ) |
Returns an array of entities currently using this chunk.
| getFullBlock | ( | int | $x, |
| int | $y, | ||
| int | $z | ||
| ) |
Returns a bitmap of block ID and meta at the specified chunk block coordinates
| int | $x | 0-15 |
| int | $y | |
| int | $z | 0-15 |
| getHeight | ( | ) |
Returns the chunk height in count of subchunks.
| getHeightMap | ( | int | $x, |
| int | $z | ||
| ) |
| getHeightMapArray | ( | ) |
| getHighestBlockAt | ( | int | $x, |
| int | $z | ||
| ) |
Returns the Y coordinate of the highest non-air block at the specified X/Z chunk block coordinates
| int | $x | 0-15 |
| int | $z | 0-15 |
| getHighestSubChunkIndex | ( | ) |
Returns the Y coordinate of the highest non-empty subchunk in this chunk.
| getSubChunk | ( | int | $y, |
| bool | $generateNew = false |
||
| ) |
Returns the subchunk at the specified subchunk Y coordinate, or an empty, unmodifiable stub if it does not exist or the coordinate is out of range.
| int | $y | |
| bool | $generateNew | Whether to create a new, modifiable subchunk if there is not one in place |
| getSubChunks | ( | ) |
| getSubChunkSendCount | ( | ) |
Returns the count of subchunks that need sending to players
| getTile | ( | int | $x, |
| int | $y, | ||
| int | $z | ||
| ) |
| getTiles | ( | ) |
| getX | ( | ) |
| getZ | ( | ) |
| hasChanged | ( | ) |
| isGenerated | ( | ) |
| isLightPopulated | ( | ) |
| isPopulated | ( | ) |
| networkSerialize | ( | ) |
| populateSkyLight | ( | ) |
Performs basic sky light population on the chunk. This does not cater for adjacent sky light, this performs direct sky light population only. This may cause some strange visual artifacts if the chunk is light-populated after being terrain-populated.
TODO: fast adjacent light spread
| pruneEmptySubChunks | ( | ) |
| recalculateHeightMap | ( | ) |
| recalculateHeightMapColumn | ( | int | $x, |
| int | $z | ||
| ) |
Recalculates the heightmap for the block column at the specified X/Z chunk coordinates
| int | $x | 0-15 |
| int | $z | 0-15 |
| removeEntity | ( | Entity | $entity | ) |
| Entity | $entity |
| removeTile | ( | Tile | $tile | ) |
| setBiomeId | ( | int | $x, |
| int | $z, | ||
| int | $biomeId | ||
| ) |
Sets the biome ID at the specified X/Z chunk block coordinates
| int | $x | 0-15 |
| int | $z | 0-15 |
| int | $biomeId | 0-255 |
| setBlock | ( | int | $x, |
| int | $y, | ||
| int | $z, | ||
$blockId = null, |
|||
$meta = null |
|||
| ) |
Sets block ID and meta in one call at the specified chunk block coordinates
| int | $x | 0-15 |
| int | $y | |
| int | $z | 0-15 |
| int | null | $blockId | 0-255 if null, does not change |
| int | null | $meta | 0-15 if null, does not change |
| setBlockData | ( | int | $x, |
| int | $y, | ||
| int | $z, | ||
| int | $data | ||
| ) |
Sets the block meta value at the specified chunk block coordinates
| int | $x | 0-15 |
| int | $y | |
| int | $z | 0-15 |
| int | $data | 0-15 |
| setBlockExtraData | ( | int | $x, |
| int | $y, | ||
| int | $z, | ||
| int | $data | ||
| ) |
Sets the raw block extra data value at the specified chunk block coordinates
| int | $x | 0-15 |
| int | $y | |
| int | $z | 0-15 |
| int | $data | bitmap, (meta << 8) | id |
| setBlockId | ( | int | $x, |
| int | $y, | ||
| int | $z, | ||
| int | $id | ||
| ) |
Sets the block ID at the specified chunk block coordinates
| int | $x | 0-15 |
| int | $y | |
| int | $z | 0-15 |
| int | $id | 0-255 |
| setBlockLight | ( | int | $x, |
| int | $y, | ||
| int | $z, | ||
| int | $level | ||
| ) |
Sets the block light level at the specified chunk block coordinates
| int | $x | 0-15 |
| int | $y | 0-15 |
| int | $z | 0-15 |
| int | $level | 0-15 |
| setBlockSkyLight | ( | int | $x, |
| int | $y, | ||
| int | $z, | ||
| int | $level | ||
| ) |
Sets the sky light level at the specified chunk block coordinates
| int | $x | 0-15 |
| int | $y | |
| int | $z | 0-15 |
| int | $level | 0-15 |
| setChanged | ( | bool | $value = true | ) |
| bool | $value |
| setGenerated | ( | bool | $value = true | ) |
| setHeightMap | ( | int | $x, |
| int | $z, | ||
| int | $value | ||
| ) |
| setLightPopulated | ( | bool | $value = true | ) |
| setPopulated | ( | bool | $value = true | ) |
| setSubChunk | ( | int | $y, |
| SubChunk | $subChunk = null, |
||
| bool | $allowEmpty = false |
||
| ) |
Sets a subchunk in the chunk index
| int | $y | |
| SubChunk | null | $subChunk | |
| bool | $allowEmpty | Whether to check if the chunk is empty, and if so replace it with an empty stub |
| setX | ( | int | $x | ) |
| setZ | ( | int | $z | ) |
| int | $z |
| unload | ( | bool | $safe = true | ) |
Unloads the chunk, closing entities and tiles.
| bool | $safe | Whether to check if there are still players using this chunk |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
| const MAX_SUBCHUNKS = 16 |