mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Fixed stained/hardened clay being harvestable without a pickaxe, close #1803
This commit is contained in:
parent
50f3231629
commit
c669819bbb
@ -23,6 +23,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace pocketmine\block;
|
||||
|
||||
use pocketmine\item\TieredTool;
|
||||
|
||||
class HardenedClay extends Solid{
|
||||
|
||||
protected $id = self::HARDENED_CLAY;
|
||||
@ -39,6 +41,10 @@ class HardenedClay extends Solid{
|
||||
return BlockToolType::TYPE_PICKAXE;
|
||||
}
|
||||
|
||||
public function getToolHarvestLevel() : int{
|
||||
return TieredTool::TIER_WOODEN;
|
||||
}
|
||||
|
||||
public function getHardness() : float{
|
||||
return 1.25;
|
||||
}
|
||||
|
@ -25,24 +25,11 @@ namespace pocketmine\block;
|
||||
|
||||
use pocketmine\block\utils\ColorBlockMetaHelper;
|
||||
|
||||
class StainedClay extends Solid{
|
||||
class StainedClay extends HardenedClay{
|
||||
|
||||
protected $id = self::STAINED_CLAY;
|
||||
|
||||
public function __construct(int $meta = 0){
|
||||
$this->meta = $meta;
|
||||
}
|
||||
|
||||
public function getHardness() : float{
|
||||
return 1.25;
|
||||
}
|
||||
|
||||
public function getToolType() : int{
|
||||
return BlockToolType::TYPE_PICKAXE;
|
||||
}
|
||||
|
||||
public function getName() : string{
|
||||
return ColorBlockMetaHelper::getColorFromMeta($this->meta) . " Stained Clay";
|
||||
}
|
||||
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user