Using BlockFactory instead of Block

This commit is contained in:
Matt 2017-10-22 17:42:38 +02:00 committed by Dylan K. Taylor
parent 270e0c076c
commit 13e5718463

View File

@ -24,6 +24,7 @@ declare(strict_types=1);
namespace pocketmine\entity;
use pocketmine\block\Block;
use pocketmine\block\BlockFactory;
use pocketmine\block\Fallable;
use pocketmine\event\entity\EntityBlockChangeEvent;
use pocketmine\event\entity\EntityDamageEvent;
@ -70,7 +71,7 @@ class FallingSand extends Entity{
return;
}
$this->block = Block::get($blockId, $damage);
$this->block = BlockFactory::get($blockId, $damage);
$this->setDataProperty(self::DATA_VARIANT, self::DATA_TYPE_INT, $this->block->getId() | ($this->block->getDamage() << 8));
}