| 
|   | __construct (array $subChunks, bool $terrainPopulated) | 
|   | 
|   | __clone () | 
|   | 
|   | addTile (Tile $tile) | 
|   | 
|   | clearTerrainDirtyFlags () | 
|   | 
|   | collectGarbage () | 
|   | 
|   | getBiomeId (int $x, int $y, int $z) | 
|   | 
|   | getBlockStateId (int $x, int $y, int $z) | 
|   | 
|   | getHeight () | 
|   | 
|   | getHeightMap (int $x, int $z) | 
|   | 
|   | getHeightMapArray () | 
|   | 
|   | getHighestBlockAt (int $x, int $z) | 
|   | 
|   | getSubChunk (int $y) | 
|   | 
|   | getSubChunks () | 
|   | 
|   | getTerrainDirtyFlag (int $flag) | 
|   | 
|   | getTerrainDirtyFlags () | 
|   | 
|   | getTile (int $x, int $y, int $z) | 
|   | 
|   | getTiles () | 
|   | 
|   | isLightPopulated () | 
|   | 
|   | isPopulated () | 
|   | 
|   | isTerrainDirty () | 
|   | 
|   | onUnload () | 
|   | 
|   | removeTile (Tile $tile) | 
|   | 
|   | setBiomeId (int $x, int $y, int $z, int $biomeId) | 
|   | 
|   | setBlockStateId (int $x, int $y, int $z, int $block) | 
|   | 
|   | setHeightMap (int $x, int $z, int $value) | 
|   | 
|   | setHeightMapArray (array $values) | 
|   | 
|   | setLightPopulated (?bool $value=true) | 
|   | 
|   | setPopulated (bool $value=true) | 
|   | 
|   | setSubChunk (int $y, ?SubChunk $subChunk) | 
|   | 
|   | setTerrainDirty () | 
|   | 
|   | setTerrainDirtyFlag (int $flag, bool $value) | 
|   | 
Definition at line 34 of file Chunk.php.
 
◆ __construct()
      
        
          | pocketmine\world\format\Chunk::__construct  | 
          ( | 
          array |           $subChunks,  | 
        
        
           | 
           | 
          bool |           $terrainPopulated ) | 
        
      
 
 
◆ __clone()
      
        
          | pocketmine\world\format\Chunk::__clone  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ addTile()
      
        
          | pocketmine\world\format\Chunk::addTile  | 
          ( | 
          Tile |           $tile | ) | 
           | 
        
      
 
 
◆ blockHash()
  
  
      
        
          | static pocketmine\world\format\Chunk::blockHash  | 
          ( | 
          int |           $x,  | 
         
        
           | 
           | 
          int |           $y,  | 
         
        
           | 
           | 
          int |           $z ) | 
         
       
   | 
  
static   | 
  
 
Hashes the given chunk block coordinates into a single integer.
- Parameters
 - 
  
    | int | $x | 0-15  | 
    | int | $y | dependent on the height of the world  | 
    | int | $z | 0-15  | 
  
   
Definition at line 341 of file Chunk.php.
 
 
◆ clearTerrainDirtyFlags()
      
        
          | pocketmine\world\format\Chunk::clearTerrainDirtyFlags  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ collectGarbage()
      
        
          | pocketmine\world\format\Chunk::collectGarbage  | 
          ( | 
           | ) | 
           | 
        
      
 
Disposes of empty subchunks and frees data where possible 
Definition at line 320 of file Chunk.php.
 
 
◆ getBiomeId()
      
        
          | pocketmine\world\format\Chunk::getBiomeId  | 
          ( | 
          int |           $x,  | 
        
        
           | 
           | 
          int |           $y,  | 
        
        
           | 
           | 
          int |           $z ) | 
        
      
 
Returns the biome ID at the specified X/Z chunk block coordinates
- Parameters
 - 
  
    | int | $x | 0-15  | 
    | int | $y | dependent on the height of the world  | 
    | int | $z | 0-15 | 
  
   
- See also
 - BiomeIds 
 
Definition at line 161 of file Chunk.php.
 
 
◆ getBlockStateId()
      
        
          | pocketmine\world\format\Chunk::getBlockStateId  | 
          ( | 
          int |           $x,  | 
        
        
           | 
           | 
          int |           $y,  | 
        
        
           | 
           | 
          int |           $z ) | 
        
      
 
Returns the internal ID of the blockstate at the given coordinates.
- Parameters
 - 
  
    | int | $x | 0-15  | 
    | int | $y | dependent on the height of the world  | 
    | int | $z | 0-15 | 
  
   
- Returns
 - int the blockstate ID of the given block 
 
Definition at line 101 of file Chunk.php.
 
 
◆ getHeight()
      
        
          | pocketmine\world\format\Chunk::getHeight  | 
          ( | 
           | ) | 
           | 
        
      
 
Returns the chunk height in count of subchunks. 
Definition at line 88 of file Chunk.php.
 
 
◆ getHeightMap()
      
        
          | pocketmine\world\format\Chunk::getHeightMap  | 
          ( | 
          int |           $x,  | 
        
        
           | 
           | 
          int |           $z ) | 
        
      
 
Returns the heightmap value at the specified X/Z chunk block coordinates
- Parameters
 - 
  
  
 
Definition at line 138 of file Chunk.php.
 
 
◆ getHeightMapArray()
      
        
          | pocketmine\world\format\Chunk::getHeightMapArray  | 
          ( | 
           | ) | 
           | 
        
      
 
- Returns
 - int[] @phpstan-return non-empty-list<int> 
 
Definition at line 246 of file Chunk.php.
 
 
◆ getHighestBlockAt()
      
        
          | pocketmine\world\format\Chunk::getHighestBlockAt  | 
          ( | 
          int |           $x,  | 
        
        
           | 
           | 
          int |           $z ) | 
        
      
 
Returns the Y coordinate of the highest non-air block at the specified X/Z chunk block coordinates
- Parameters
 - 
  
  
 
- Returns
 - int|null the Y coordinate, or null if there are no blocks in the column 
 
Definition at line 121 of file Chunk.php.
 
 
◆ getSubChunk()
      
        
          | pocketmine\world\format\Chunk::getSubChunk  | 
          ( | 
          int |           $y | ) | 
           | 
        
      
 
 
◆ getSubChunks()
      
        
          | pocketmine\world\format\Chunk::getSubChunks  | 
          ( | 
           | ) | 
           | 
        
      
 
- Returns
 - SubChunk[] @phpstan-return array<int, SubChunk> 
 
Definition at line 309 of file Chunk.php.
 
 
◆ getTerrainDirtyFlag()
      
        
          | pocketmine\world\format\Chunk::getTerrainDirtyFlag  | 
          ( | 
          int |           $flag | ) | 
           | 
        
      
 
 
◆ getTerrainDirtyFlags()
      
        
          | pocketmine\world\format\Chunk::getTerrainDirtyFlags  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ getTile()
      
        
          | pocketmine\world\format\Chunk::getTile  | 
          ( | 
          int |           $x,  | 
        
        
           | 
           | 
          int |           $y,  | 
        
        
           | 
           | 
          int |           $z ) | 
        
      
 
Returns the tile at the specified chunk block coordinates, or null if no tile exists.
- Parameters
 - 
  
    | int | $x | 0-15  | 
    | int | $y | dependent on the height of the world  | 
    | int | $z | 0-15  | 
  
   
Definition at line 229 of file Chunk.php.
 
 
◆ getTiles()
      
        
          | pocketmine\world\format\Chunk::getTiles  | 
          ( | 
           | ) | 
           | 
        
      
 
- Returns
 - Tile[] @phpstan-return array<int, Tile> 
 
Definition at line 218 of file Chunk.php.
 
 
◆ isLightPopulated()
      
        
          | pocketmine\world\format\Chunk::isLightPopulated  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ isPopulated()
      
        
          | pocketmine\world\format\Chunk::isPopulated  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ isTerrainDirty()
      
        
          | pocketmine\world\format\Chunk::isTerrainDirty  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ onUnload()
      
        
          | pocketmine\world\format\Chunk::onUnload  | 
          ( | 
           | ) | 
           | 
        
      
 
Called when the chunk is unloaded, closing entities and tiles. 
Definition at line 236 of file Chunk.php.
 
 
◆ removeTile()
      
        
          | pocketmine\world\format\Chunk::removeTile  | 
          ( | 
          Tile |           $tile | ) | 
           | 
        
      
 
 
◆ setBiomeId()
      
        
          | pocketmine\world\format\Chunk::setBiomeId  | 
          ( | 
          int |           $x,  | 
        
        
           | 
           | 
          int |           $y,  | 
        
        
           | 
           | 
          int |           $z,  | 
        
        
           | 
           | 
          int |           $biomeId ) | 
        
      
 
Sets the biome ID at the specified X/Z chunk block coordinates
- Parameters
 - 
  
    | int | $x | 0-15  | 
    | int | $y | dependent on the height of the world  | 
    | int | $z | 0-15  | 
    | int | $biomeId | A valid biome ID | 
  
   
- See also
 - BiomeIds 
 
Definition at line 175 of file Chunk.php.
 
 
◆ setBlockStateId()
      
        
          | pocketmine\world\format\Chunk::setBlockStateId  | 
          ( | 
          int |           $x,  | 
        
        
           | 
           | 
          int |           $y,  | 
        
        
           | 
           | 
          int |           $z,  | 
        
        
           | 
           | 
          int |           $block ) | 
        
      
 
Sets the blockstate at the given coordinate by internal ID. 
Definition at line 108 of file Chunk.php.
 
 
◆ setHeightMap()
      
        
          | pocketmine\world\format\Chunk::setHeightMap  | 
          ( | 
          int |           $x,  | 
        
        
           | 
           | 
          int |           $z,  | 
        
        
           | 
           | 
          int |           $value ) | 
        
      
 
Returns the heightmap value at the specified X/Z chunk block coordinates
- Parameters
 - 
  
  
 
Definition at line 148 of file Chunk.php.
 
 
◆ setHeightMapArray()
      
        
          | pocketmine\world\format\Chunk::setHeightMapArray  | 
          ( | 
          array |           $values | ) | 
           | 
        
      
 
- Parameters
 - 
  
    | int[] | $values | @phpstan-param non-empty-list<int> $values  | 
  
   
Definition at line 254 of file Chunk.php.
 
 
◆ setLightPopulated()
      
        
          | pocketmine\world\format\Chunk::setLightPopulated  | 
          ( | 
          ?bool |           $value = true | ) | 
           | 
        
      
 
 
◆ setPopulated()
      
        
          | pocketmine\world\format\Chunk::setPopulated  | 
          ( | 
          bool |           $value = true | ) | 
           | 
        
      
 
 
◆ setSubChunk()
      
        
          | pocketmine\world\format\Chunk::setSubChunk  | 
          ( | 
          int |           $y,  | 
        
        
           | 
           | 
          ?SubChunk |           $subChunk ) | 
        
      
 
Sets a subchunk in the chunk index 
Definition at line 296 of file Chunk.php.
 
 
◆ setTerrainDirty()
      
        
          | pocketmine\world\format\Chunk::setTerrainDirty  | 
          ( | 
           | ) | 
           | 
        
      
 
 
◆ setTerrainDirtyFlag()
      
        
          | pocketmine\world\format\Chunk::setTerrainDirtyFlag  | 
          ( | 
          int |           $flag,  | 
        
        
           | 
           | 
          bool |           $value ) | 
        
      
 
 
◆ $heightMap
◆ $lightPopulated
  
  
      
        
          | bool pocketmine\world\format\Chunk::$lightPopulated = false | 
         
       
   | 
  
protected   | 
  
 
 
◆ $subChunks
  
  
      
        
          | SplFixedArray pocketmine\world\format\Chunk::$subChunks | 
         
       
   | 
  
protected   | 
  
 
 
◆ $terrainPopulated
  
  
      
        
          | bool pocketmine\world\format\Chunk::$terrainPopulated = false | 
         
       
   | 
  
protected   | 
  
 
 
◆ $tiles
  
  
      
        
          | array pocketmine\world\format\Chunk::$tiles = [] | 
         
       
   | 
  
protected   | 
  
 
 
◆ COORD_BIT_SIZE
      
        
          | const pocketmine\world\format\Chunk::COORD_BIT_SIZE = SubChunk::COORD_BIT_SIZE | 
        
      
 
 
◆ COORD_MASK
      
        
          | const pocketmine\world\format\Chunk::COORD_MASK = SubChunk::COORD_MASK | 
        
      
 
 
◆ DIRTY_FLAG_BIOMES
      
        
          | const pocketmine\world\format\Chunk::DIRTY_FLAG_BIOMES = 1 << 3 | 
        
      
 
 
◆ DIRTY_FLAG_BLOCKS
      
        
          | const pocketmine\world\format\Chunk::DIRTY_FLAG_BLOCKS = 1 << 0 | 
        
      
 
 
◆ DIRTY_FLAGS_ALL
      
        
          | const pocketmine\world\format\Chunk::DIRTY_FLAGS_ALL = ~0 | 
        
      
 
 
◆ DIRTY_FLAGS_NONE
      
        
          | const pocketmine\world\format\Chunk::DIRTY_FLAGS_NONE = 0 | 
        
      
 
 
◆ EDGE_LENGTH
      
        
          | const pocketmine\world\format\Chunk::EDGE_LENGTH = SubChunk::EDGE_LENGTH | 
        
      
 
 
◆ MAX_SUBCHUNK_INDEX
      
        
          | const pocketmine\world\format\Chunk::MAX_SUBCHUNK_INDEX = 19 | 
        
      
 
 
◆ MAX_SUBCHUNKS
      
        
          | const pocketmine\world\format\Chunk::MAX_SUBCHUNKS = self::MAX_SUBCHUNK_INDEX - self::MIN_SUBCHUNK_INDEX + 1 | 
        
      
 
 
◆ MIN_SUBCHUNK_INDEX
      
        
          | const pocketmine\world\format\Chunk::MIN_SUBCHUNK_INDEX = -4 | 
        
      
 
 
The documentation for this class was generated from the following file: