Pull tier info out of TieredTool, create ToolTier enum

This commit is contained in:
Dylan K. Taylor
2019-07-17 18:06:49 +01:00
parent 7954a81602
commit 1a1feefd3e
37 changed files with 220 additions and 174 deletions

View File

@@ -27,7 +27,7 @@ use pocketmine\block\utils\BlockDataValidator;
use pocketmine\block\utils\Fallable;
use pocketmine\block\utils\FallableTrait;
use pocketmine\item\Item;
use pocketmine\item\TieredTool;
use pocketmine\item\ToolTier;
use pocketmine\item\VanillaItems;
use pocketmine\math\AxisAlignedBB;
use pocketmine\math\Facing;
@@ -44,7 +44,7 @@ class SnowLayer extends Flowable implements Fallable{
protected $layers = 1;
public function __construct(BlockIdentifier $idInfo, string $name, ?BlockBreakInfo $breakInfo = null){
parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(0.1, BlockToolType::SHOVEL, TieredTool::TIER_WOODEN));
parent::__construct($idInfo, $name, $breakInfo ?? new BlockBreakInfo(0.1, BlockToolType::SHOVEL, ToolTier::WOOD()->getHarvestLevel()));
}
protected function writeStateToMeta() : int{