Split some block variants into their own classes where behaviour differs

This commit is contained in:
Dylan K. Taylor
2018-09-28 16:21:03 +01:00
parent e038c4295d
commit 2600cf5977
14 changed files with 200 additions and 102 deletions

View File

@ -23,7 +23,17 @@ declare(strict_types=1);
namespace pocketmine\block;
class Purpur extends Quartz{
use pocketmine\item\TieredTool;
class Purpur extends Solid{
public function getToolType() : int{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getHardness() : float{
return 1.5;
@ -32,4 +42,8 @@ class Purpur extends Quartz{
public function getBlastResistance() : float{
return 30;
}
public function getStateBitmask() : int{
return 0b1100; //HACK: needs to be consistent for blocks with the same ID :(
}
}