mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
SnowLayer: Fixed tool requirement
This commit is contained in:
parent
c669819bbb
commit
7c6535283e
@ -25,6 +25,7 @@ namespace pocketmine\block;
|
||||
|
||||
use pocketmine\item\Item;
|
||||
use pocketmine\item\ItemFactory;
|
||||
use pocketmine\item\TieredTool;
|
||||
use pocketmine\level\Level;
|
||||
use pocketmine\math\Vector3;
|
||||
use pocketmine\Player;
|
||||
@ -53,6 +54,10 @@ class SnowLayer extends Flowable{
|
||||
return BlockToolType::TYPE_SHOVEL;
|
||||
}
|
||||
|
||||
public function getToolHarvestLevel() : int{
|
||||
return TieredTool::TIER_WOODEN;
|
||||
}
|
||||
|
||||
public function ticksRandomly() : bool{
|
||||
return true;
|
||||
}
|
||||
@ -86,13 +91,9 @@ class SnowLayer extends Flowable{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function getDrops(Item $item) : array{
|
||||
if($item->isShovel() !== false){
|
||||
return [
|
||||
ItemFactory::get(Item::SNOWBALL, 0, 1) //TODO: check layer count
|
||||
];
|
||||
}
|
||||
|
||||
return [];
|
||||
public function getDropsForCompatibleTool(Item $item) : array{
|
||||
return [
|
||||
ItemFactory::get(Item::SNOWBALL, 0, 1) //TODO: check layer count
|
||||
];
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user