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

@ -24,11 +24,12 @@ declare(strict_types=1);
namespace pocketmine\level\particle;
use pocketmine\block\Block;
use pocketmine\block\BlockFactory;
use pocketmine\math\Vector3;
class DestroyBlockParticle extends DestroyParticle{
public function __construct(Vector3 $pos, Block $b){
parent::__construct($pos, $b->getId() | ($b->getDamage() << 8));
parent::__construct($pos, BlockFactory::toStaticRuntimeId($b->getId(), $b->getDamage()));
}
}

View File

@ -24,10 +24,11 @@ declare(strict_types=1);
namespace pocketmine\level\particle;
use pocketmine\block\Block;
use pocketmine\block\BlockFactory;
use pocketmine\math\Vector3;
class TerrainParticle extends GenericParticle{
public function __construct(Vector3 $pos, Block $b){
parent::__construct($pos, Particle::TYPE_TERRAIN, ($b->getDamage() << 8) | $b->getId());
parent::__construct($pos, Particle::TYPE_TERRAIN, BlockFactory::toStaticRuntimeId($b->getId(), $b->getDamage()));
}
}