More changes! Alsp added Anvil block and BinaryStream

This commit is contained in:
Shoghi Cervantes
2015-08-03 18:04:13 +02:00
parent 522932d7c0
commit 7fd053fb09
13 changed files with 422 additions and 202 deletions

View File

@ -31,6 +31,7 @@ use pocketmine\nbt\tag\Compound;
use pocketmine\network\protocol\FullChunkDataPacket;
use pocketmine\tile\Spawnable;
use pocketmine\utils\ChunkException;
use raklib\Binary;
class Anvil extends McRegion{
@ -94,6 +95,8 @@ class Anvil extends McRegion{
$chunk->getBlockLightArray() .
pack("C*", ...$chunk->getHeightMapArray()) .
pack("N*", ...$chunk->getBiomeColorArray()) .
//TODO extra data
Binary::writeInt(0) .
$tiles;
$this->getLevel()->chunkRequestCallback($x, $z, $ordered, FullChunkDataPacket::ORDER_LAYERED);

View File

@ -162,6 +162,8 @@ class LevelDB extends BaseLevelProvider{
$chunk->getBlockLightArray() .
$heightmap .
$biomeColors .
//TODO extra data
Binary::writeInt(0) .
$tiles;
$this->getLevel()->chunkRequestCallback($x, $z, $ordered);

View File

@ -31,7 +31,6 @@ use pocketmine\nbt\tag\Compound;
use pocketmine\nbt\tag\Int;
use pocketmine\nbt\tag\Long;
use pocketmine\nbt\tag\String;
use pocketmine\network\protocol\FullChunkDataPacket;
use pocketmine\tile\Spawnable;
use pocketmine\utils\Binary;
use pocketmine\utils\ChunkException;
@ -139,6 +138,8 @@ class McRegion extends BaseLevelProvider{
$chunk->getBlockLightArray() .
pack("C*", ...$chunk->getHeightMapArray()) .
pack("N*", ...$chunk->getBiomeColorArray()) .
//TODO extra data
Binary::writeInt(0) .
$tiles;
$this->getLevel()->chunkRequestCallback($x, $z, $ordered);