Phpcraft
|
Public Member Functions | |
__construct (int $x=null, int $z=null) | |
getSectionsBitMask () | |
getSectionAt (int $y) | |
getSection (int $index) | |
setSection (int $index, ChunkSection $section) | |
flagChanged () | |
copy (int $x, int $z) | |
set (int $x, int $y, int $z, ?BlockState $blockState=null) | |
getIndexes (int $x, int $y, int $z) | |
read (Connection $con) | |
write (Connection $con) | |
getHeightmap () | |
Public Attributes | |
$x | |
$z | |
$name | |
$world | |
Phpcraft\World\Chunk::__construct | ( | int | $x = null , |
int | $z = null |
||
) |
Phpcraft\World\Chunk::copy | ( | int | $x, |
int | $z | ||
) |
Phpcraft\World\Chunk::flagChanged | ( | ) |
Flags the chunk as changed, e.g. for the server to re-send to clients.
Phpcraft\World\Chunk::getHeightmap | ( | ) |
Phpcraft\World\Chunk::getIndexes | ( | int | $x, |
int | $y, | ||
int | $z | ||
) |
Phpcraft\World\Chunk::getSection | ( | int | $index | ) |
Phpcraft\World\Chunk::getSectionAt | ( | int | $y | ) |
Phpcraft\World\Chunk::getSectionsBitMask | ( | ) |
Phpcraft\World\Chunk::read | ( | Connection | $con | ) |
Reads the chunk data after the X, Z, "Is New Chunk" and "Ignore Old Data" fields from the given Connection.
Connection | $con |
IOException |
Phpcraft\World\Chunk::set | ( | int | $x, |
int | $y, | ||
int | $z, | ||
?BlockState | $blockState = null |
||
) |
Sets the block state at the given position.
int | $x | Absolute X position of the block within the world. |
int | $y | |
int | $z | Absolute Z position of the block within the world. |
BlockState | null | $blockState |
Phpcraft\World\Chunk::setSection | ( | int | $index, |
ChunkSection | $section | ||
) |
Phpcraft\World\Chunk::write | ( | Connection | $con | ) |
Writes the chunk data after the X, Z, "Is New Chunk" and "Ignore Old Data" fields to the given Connection.
Connection | $con |
string null Phpcraft\World\Chunk::$name |
World null Phpcraft\World\Chunk::$world |
int null Phpcraft\World\Chunk::$x |
int null Phpcraft\World\Chunk::$z |