Merge changes from ALPHA11 for 1.2.13

This commit is contained in:
Dylan K. Taylor
2018-04-04 11:31:39 +01:00
28 changed files with 415 additions and 283 deletions

View File

@ -893,14 +893,16 @@ class Level implements ChunkManager, Metadatable{
$pk->z = $b->z;
if($b instanceof Block){
$pk->blockId = $b->getId();
$pk->blockData = $b->getDamage();
$blockId = $b->getId();
$blockData = $b->getDamage();
}else{
$fullBlock = $this->getFullBlock($b->x, $b->y, $b->z);
$pk->blockId = $fullBlock >> 4;
$pk->blockData = $fullBlock & 0xf;
$blockId = $fullBlock >> 4;
$blockData = $fullBlock & 0xf;
}
$pk->blockRuntimeId = BlockFactory::toStaticRuntimeId($blockId, $blockData);
$pk->flags = $first ? $flags : UpdateBlockPacket::FLAG_NONE;
$packets[] = $pk;
@ -917,14 +919,16 @@ class Level implements ChunkManager, Metadatable{
$pk->z = $b->z;
if($b instanceof Block){
$pk->blockId = $b->getId();
$pk->blockData = $b->getDamage();
$blockId = $b->getId();
$blockData = $b->getDamage();
}else{
$fullBlock = $this->getFullBlock($b->x, $b->y, $b->z);
$pk->blockId = $fullBlock >> 4;
$pk->blockData = $fullBlock & 0xf;
$blockId = $fullBlock >> 4;
$blockData = $fullBlock & 0xf;
}
$pk->blockRuntimeId = BlockFactory::toStaticRuntimeId($blockId, $blockData);
$pk->flags = $flags;
$packets[] = $pk;
@ -1874,7 +1878,7 @@ class Level implements ChunkManager, Metadatable{
}
if($playSound){
$this->broadcastLevelSoundEvent($hand, LevelSoundEventPacket::SOUND_PLACE, 1, $hand->getId());
$this->broadcastLevelSoundEvent($hand, LevelSoundEventPacket::SOUND_PLACE, 1, BlockFactory::toStaticRuntimeId($hand->getId(), $hand->getDamage()));
}
$item->pop();