|
| | __construct ($seed, $waterHeight=0) |
| |
| | getWaterHeight () |
| |
| | getBlockIdAt (int $x, int $y, int $z) |
| |
| | setBlockIdAt (int $x, int $y, int $z, int $id) |
| |
| | getBlockDataAt (int $x, int $y, int $z) |
| |
| | setBlockDataAt (int $x, int $y, int $z, int $data) |
| |
| | getBlockLightAt (int $x, int $y, int $z) |
| |
| | setBlockLightAt (int $x, int $y, int $z, int $level) |
| |
| | getChunk (int $chunkX, int $chunkZ) |
| |
| | setChunk (int $chunkX, int $chunkZ, Chunk $chunk=null) |
| |
| | cleanChunks () |
| |
| | getSeed () |
| |
| | updateBlockLight (int $x, int $y, int $z) |
| |
◆ __construct()
| __construct |
( |
|
$seed, |
|
|
|
$waterHeight = 0 |
|
) |
| |
◆ cleanChunks()
◆ getBlockDataAt()
| getBlockDataAt |
( |
int |
$x, |
|
|
int |
$y, |
|
|
int |
$z |
|
) |
| |
Gets the raw block metadata
- Parameters
-
- Returns
- int 0-15
Implements ChunkManager.
96 if($chunk = $this->
getChunk($x >> 4, $z >> 4)){
97 return $chunk->getBlockData($x & 0xf, $y &
Level::Y_MASK, $z & 0xf);
◆ getBlockIdAt()
| getBlockIdAt |
( |
int |
$x, |
|
|
int |
$y, |
|
|
int |
$z |
|
) |
| |
Gets the raw block id.
- Parameters
-
- Returns
- int 0-255
Implements ChunkManager.
66 if($chunk = $this->
getChunk($x >> 4, $z >> 4)){
67 return $chunk->getBlockId($x & 0xf, $y &
Level::Y_MASK, $z & 0xf);
◆ getBlockLightAt()
| getBlockLightAt |
( |
int |
$x, |
|
|
int |
$y, |
|
|
int |
$z |
|
) |
| |
Gets the raw block light level
- Parameters
-
- Returns
- int 0-15
Implements ChunkManager.
126 if($chunk = $this->
getChunk($x >> 4, $z >> 4)){
127 return $chunk->getBlockLight($x & 0x0f, $y & 0x7f, $z & 0x0f);
◆ getChunk()
| getChunk |
( |
int |
$chunkX, |
|
|
int |
$chunkZ |
|
) |
| |
- Parameters
-
- Returns
- Chunk|null
Implements ChunkManager.
265 return isset($this->chunks[$index =
Level::chunkHash($chunkX, $chunkZ)]) ? $this->chunks[$index] : null;
◆ getSeed()
Gets the level seed
- Returns
- int|string
Implements ChunkManager.
◆ getWaterHeight()
◆ setBlockDataAt()
| setBlockDataAt |
( |
int |
$x, |
|
|
int |
$y, |
|
|
int |
$z, |
|
|
int |
$data |
|
) |
| |
Sets the raw block metadata.
- Parameters
-
| int | $x | |
| int | $y | |
| int | $z | |
| int | $data | 0-15 |
Implements ChunkManager.
111 if($chunk = $this->
getChunk($x >> 4, $z >> 4)){
112 $chunk->setBlockData($x & 0xf, $y &
Level::Y_MASK, $z & 0xf, $data);
◆ setBlockIdAt()
| setBlockIdAt |
( |
int |
$x, |
|
|
int |
$y, |
|
|
int |
$z, |
|
|
int |
$id |
|
) |
| |
Sets the raw block id.
- Parameters
-
| int | $x | |
| int | $y | |
| int | $z | |
| int | $id | 0-255 |
Implements ChunkManager.
81 if($chunk = $this->
getChunk($x >> 4, $z >> 4)){
82 $chunk->setBlockId($x & 0xf, $y &
Level::Y_MASK, $z & 0xf, $id);
◆ setBlockLightAt()
| setBlockLightAt |
( |
int |
$x, |
|
|
int |
$y, |
|
|
int |
$z, |
|
|
int |
$level |
|
) |
| |
Sets the raw block light level.
- Parameters
-
| int | $x | |
| int | $y | |
| int | $z | |
| int | $level | 0-15 |
Implements ChunkManager.
141 if($chunk = $this->
getChunk($x >> 4, $z >> 4)){
142 $chunk->setBlockLight($x & 0x0f, $y & 0x7f, $z & 0x0f, $level & 0x0f);
◆ setChunk()
| setChunk |
( |
int |
$chunkX, |
|
|
int |
$chunkZ, |
|
|
Chunk |
$chunk = null |
|
) |
| |
- Parameters
-
| int | $chunkX | |
| int | $chunkZ | |
| Chunk | $chunk | |
Implements ChunkManager.
◆ $chunks
◆ $seed
◆ $waterHeight
The documentation for this class was generated from the following file:
- src/pocketmine/level/SimpleChunkManager.php