ConcretePowder: add tool type

This commit is contained in:
Dylan K. Taylor 2017-09-26 19:00:53 +01:00
parent c79a5509f6
commit 78af87a572

View File

@ -24,6 +24,7 @@ declare(strict_types=1);
namespace pocketmine\block;
use pocketmine\block\utils\ColorBlockMetaHelper;
use pocketmine\item\Tool;
use pocketmine\level\Level;
use pocketmine\level\Position;
@ -43,6 +44,10 @@ class ConcretePowder extends Fallable{
return 0.5;
}
public function getToolType() : int{
return Tool::TYPE_SHOVEL;
}
public function onUpdate(int $type){
if($type === Level::BLOCK_UPDATE_NORMAL and ($block = $this->checkAdjacentWater()) !== null){
$this->level->setBlock($this, $block);