mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-19 09:54:10 +00:00
ConcretePowder: add tool type
This commit is contained in:
parent
c79a5509f6
commit
78af87a572
@ -24,6 +24,7 @@ declare(strict_types=1);
|
|||||||
namespace pocketmine\block;
|
namespace pocketmine\block;
|
||||||
|
|
||||||
use pocketmine\block\utils\ColorBlockMetaHelper;
|
use pocketmine\block\utils\ColorBlockMetaHelper;
|
||||||
|
use pocketmine\item\Tool;
|
||||||
use pocketmine\level\Level;
|
use pocketmine\level\Level;
|
||||||
use pocketmine\level\Position;
|
use pocketmine\level\Position;
|
||||||
|
|
||||||
@ -43,6 +44,10 @@ class ConcretePowder extends Fallable{
|
|||||||
return 0.5;
|
return 0.5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getToolType() : int{
|
||||||
|
return Tool::TYPE_SHOVEL;
|
||||||
|
}
|
||||||
|
|
||||||
public function onUpdate(int $type){
|
public function onUpdate(int $type){
|
||||||
if($type === Level::BLOCK_UPDATE_NORMAL and ($block = $this->checkAdjacentWater()) !== null){
|
if($type === Level::BLOCK_UPDATE_NORMAL and ($block = $this->checkAdjacentWater()) !== null){
|
||||||
$this->level->setBlock($this, $block);
|
$this->level->setBlock($this, $block);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user