Added harvest level properties to applicable blocks

this fixes block-breaking animations with wrong tools, and also finally resolves the long-standing hierarchy problem in Stair.
This commit is contained in:
Dylan K. Taylor 2017-12-11 15:08:15 +00:00
parent dbc180315e
commit 99fe63b2a3
52 changed files with 213 additions and 269 deletions

View File

@ -68,6 +68,10 @@ class Anvil extends Fallable{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function recalculateBoundingBox() : ?AxisAlignedBB{
$inset = 0.125;
@ -107,7 +111,7 @@ class Anvil extends Fallable{
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
if($this->canBeBrokenWith($item)){
return [
ItemFactory::get($this->getItemId(), $this->getDamage() & 0x0c, 1)
];

View File

@ -429,9 +429,13 @@ class Block extends Position implements BlockIds, Metadatable{
* @return Item[]
*/
public function getDrops(Item $item) : array{
return [
ItemFactory::get($this->getItemId(), $this->getVariant(), 1)
];
if($this->canBeBrokenWith($item)){
return [
ItemFactory::get($this->getItemId(), $this->getVariant(), 1)
];
}
return [];
}
/**

View File

@ -49,6 +49,10 @@ class BoneBlock extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{
$this->meta = PillarRotationHelper::getMetaFromFace($this->meta, $face);
return $this->getLevel()->setBlock($blockReplace, $this, true, true);
@ -57,13 +61,4 @@ class BoneBlock extends Solid{
public function getVariantBitmask() : int{
return 0x03;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -23,6 +23,8 @@ declare(strict_types=1);
namespace pocketmine\block;
use pocketmine\item\TieredTool;
class BrickStairs extends Stair{
protected $id = self::BRICK_STAIRS;
@ -43,6 +45,10 @@ class BrickStairs extends Stair{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getName() : string{
return "Brick Stairs";
}

View File

@ -46,15 +46,11 @@ class Bricks extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getName() : string{
return "Bricks";
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -51,6 +51,10 @@ class BurningFurnace extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getLightLevel() : int{
return 13;
}
@ -90,12 +94,4 @@ class BurningFurnace extends Solid{
public function getVariantBitmask() : int{
return 0;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -42,16 +42,12 @@ class Coal extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getName() : string{
return "Coal Block";
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
public function getName() : string{
return "Coal Block";
}
public function getFuelTime() : int{

View File

@ -43,12 +43,16 @@ class CoalOre extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getName() : string{
return "Coal Ore";
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
if($this->canBeBrokenWith($item)){
return [
ItemFactory::get(Item::COAL, 0, 1)
];

View File

@ -38,6 +38,10 @@ class Cobblestone extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getName() : string{
return "Cobblestone";
}
@ -45,12 +49,4 @@ class Cobblestone extends Solid{
public function getHardness() : float{
return 2;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -23,6 +23,8 @@ declare(strict_types=1);
namespace pocketmine\block;
use pocketmine\item\TieredTool;
class CobblestoneStairs extends Stair{
protected $id = self::COBBLESTONE_STAIRS;
@ -39,6 +41,10 @@ class CobblestoneStairs extends Stair{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getName() : string{
return "Cobblestone Stairs";
}

View File

@ -47,7 +47,11 @@ class Cobweb extends Flowable{
}
public function getToolType() : int{
return BlockToolType::TYPE_SWORD;
return BlockToolType::TYPE_SWORD | BlockToolType::TYPE_SHEARS;
}
public function getToolHarvestLevel() : int{
return 1;
}
public function onEntityCollide(Entity $entity) : void{

View File

@ -47,12 +47,7 @@ class Concrete extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
}

View File

@ -46,11 +46,7 @@ class Diamond extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_IRON){
return parent::getDrops($item);
}
return [];
public function getToolHarvestLevel() : int{
return TieredTool::TIER_IRON;
}
}

View File

@ -47,8 +47,12 @@ class DiamondOre extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_IRON;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_IRON){
if($this->canBeBrokenWith($item)){
return [
ItemFactory::get(Item::DIAMOND, 0, 1)
];

View File

@ -42,12 +42,7 @@ class DoubleStoneSlab extends DoubleSlab{
return BlockToolType::TYPE_PICKAXE;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
}

View File

@ -42,15 +42,11 @@ class Emerald extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_IRON;
}
public function getName() : string{
return "Emerald Block";
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_IRON){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -43,12 +43,16 @@ class EmeraldOre extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_IRON;
}
public function getHardness() : float{
return 3;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_IRON){
if($this->canBeBrokenWith($item)){
return [
ItemFactory::get(Item::EMERALD, 0, 1)
];

View File

@ -63,6 +63,10 @@ class EnchantingTable extends Transparent{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function onActivate(Item $item, Player $player = null) : bool{
if($player instanceof Player){
//TODO lock
@ -72,12 +76,4 @@ class EnchantingTable extends Transparent{
return true;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -46,12 +46,7 @@ class EndStoneBricks extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
}

View File

@ -55,6 +55,10 @@ class EnderChest extends Chest{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{
$faces = [
0 => 4,
@ -98,8 +102,10 @@ class EnderChest extends Chest{
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return [ItemFactory::get(Item::OBSIDIAN, 0, 8)];
if($this->canBeBrokenWith($item)){
return [
ItemFactory::get(Item::OBSIDIAN, 0, 8)
];
}
return [];

View File

@ -39,6 +39,10 @@ class GlazedTerracotta extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{
if($player !== null){
$faces = [
@ -56,12 +60,4 @@ class GlazedTerracotta extends Solid{
public function getVariantBitmask() : int{
return 0;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -46,11 +46,7 @@ class Gold extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_IRON){
return parent::getDrops($item);
}
return [];
public function getToolHarvestLevel() : int{
return TieredTool::TIER_IRON;
}
}

View File

@ -46,11 +46,7 @@ class GoldOre extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_IRON){
return parent::getDrops($item);
}
return [];
public function getToolHarvestLevel() : int{
return TieredTool::TIER_IRON;
}
}

View File

@ -42,15 +42,11 @@ class Iron extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_STONE;
}
public function getHardness() : float{
return 5;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_STONE){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -46,17 +46,12 @@ class IronBars extends Thin{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getVariantBitmask() : int{
return 0;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -44,15 +44,11 @@ class IronDoor extends Door{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getHardness() : float{
return 5;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -42,15 +42,11 @@ class IronOre extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_STONE;
}
public function getHardness() : float{
return 3;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_STONE){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -42,16 +42,11 @@ class Lapis extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_STONE;
}
public function getHardness() : float{
return 3;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_STONE){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -43,12 +43,16 @@ class LapisOre extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_STONE;
}
public function getName() : string{
return "Lapis Lazuli Ore";
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_STONE){
if($this->canBeBrokenWith($item)){
return [
ItemFactory::get(Item::DYE, 4, mt_rand(4, 8))
];

View File

@ -49,6 +49,10 @@ class Magma extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getLightLevel() : int{
return 3;
}
@ -63,13 +67,4 @@ class Magma extends Solid{
$entity->attack($ev);
}
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -32,15 +32,11 @@ class NetherBrick extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getHardness() : float{
return 2;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -38,15 +38,11 @@ class NetherBrickFence extends Fence{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getName() : string{
return "Nether Brick Fence";
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -23,6 +23,8 @@ declare(strict_types=1);
namespace pocketmine\block;
use pocketmine\item\TieredTool;
class NetherBrickStairs extends Stair{
protected $id = self::NETHER_BRICK_STAIRS;
@ -43,4 +45,8 @@ class NetherBrickStairs extends Stair{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
}

View File

@ -47,8 +47,12 @@ class NetherQuartzOre extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
if($this->canBeBrokenWith($item)){
return [
ItemFactory::get(Item::QUARTZ, 0, 1)
];

View File

@ -47,12 +47,16 @@ class NetherReactor extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getHardness() : float{
return 3;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
if($this->canBeBrokenWith($item)){
return [
ItemFactory::get(Item::IRON_INGOT, 0, 6),
ItemFactory::get(Item::DIAMOND, 0, 3)

View File

@ -46,11 +46,7 @@ class Netherrack extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
}

View File

@ -42,6 +42,10 @@ class Obsidian extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_DIAMOND;
}
public function getHardness() : float{
return 35; //50 in PC
}
@ -49,12 +53,4 @@ class Obsidian extends Solid{
public function getBlastResistance() : float{
return 6000;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_DIAMOND){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -55,15 +55,11 @@ class Prismarine extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getVariantBitmask() : int{
return 0x03;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -23,6 +23,8 @@ declare(strict_types=1);
namespace pocketmine\block;
use pocketmine\item\TieredTool;
class PurpurStairs extends Stair{
protected $id = self::PURPUR_STAIRS;
@ -39,6 +41,10 @@ class PurpurStairs extends Stair{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getHardness() : float{
return 1.5;
}

View File

@ -65,15 +65,11 @@ class Quartz extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getVariantBitmask() : int{
return 0x03;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -23,6 +23,8 @@ declare(strict_types=1);
namespace pocketmine\block;
use pocketmine\item\TieredTool;
class QuartzStairs extends Stair{
protected $id = self::QUARTZ_STAIRS;
@ -39,6 +41,10 @@ class QuartzStairs extends Stair{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getName() : string{
return "Quartz Stairs";
}

View File

@ -42,15 +42,11 @@ class Redstone extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getName() : string{
return "Redstone Block";
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -64,8 +64,12 @@ class RedstoneOre extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_IRON;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_IRON){
if($this->canBeBrokenWith($item)){
return [
ItemFactory::get(Item::REDSTONE_DUST, 0, mt_rand(4, 5))
];

View File

@ -55,16 +55,11 @@ class Sandstone extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getVariantBitmask() : int{
return 0x03;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -23,6 +23,8 @@ declare(strict_types=1);
namespace pocketmine\block;
use pocketmine\item\TieredTool;
class SandstoneStairs extends Stair{
protected $id = self::SANDSTONE_STAIRS;
@ -39,6 +41,10 @@ class SandstoneStairs extends Stair{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getName() : string{
return "Sandstone Stairs";
}

View File

@ -102,12 +102,4 @@ abstract class Stair extends Transparent{
public function getVariantBitmask() : int{
return 0;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -50,6 +50,10 @@ class Stone extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getName() : string{
static $names = [
self::NORMAL => "Stone",
@ -64,7 +68,7 @@ class Stone extends Solid{
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
if($this->canBeBrokenWith($item)){
if($this->getDamage() === self::NORMAL){
return [
ItemFactory::get(Item::COBBLESTONE, $this->getDamage(), 1)

View File

@ -23,6 +23,8 @@ declare(strict_types=1);
namespace pocketmine\block;
use pocketmine\item\TieredTool;
class StoneBrickStairs extends Stair{
protected $id = self::STONE_BRICK_STAIRS;
@ -35,6 +37,10 @@ class StoneBrickStairs extends Stair{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getHardness() : float{
return 1.5;
}

View File

@ -46,6 +46,10 @@ class StoneBricks extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
public function getName() : string{
static $names = [
self::NORMAL => "Stone Bricks",
@ -55,13 +59,4 @@ class StoneBricks extends Solid{
];
return $names[$this->getVariant()] ?? "Unknown";
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
}
}

View File

@ -64,11 +64,7 @@ class StoneSlab extends Slab{
return BlockToolType::TYPE_PICKAXE;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
}

View File

@ -42,11 +42,7 @@ class Stonecutter extends Solid{
return BlockToolType::TYPE_PICKAXE;
}
public function getDrops(Item $item) : array{
if($item->isPickaxe() >= TieredTool::TIER_WOODEN){
return parent::getDrops($item);
}
return [];
public function getToolHarvestLevel() : int{
return TieredTool::TIER_WOODEN;
}
}

View File

@ -39,11 +39,4 @@ class WoodenStairs extends Stair{
public function getToolType() : int{
return BlockToolType::TYPE_AXE;
}
public function getDrops(Item $item) : array{
//TODO: Hierarchy problem (base class is for stone stairs)
return [
ItemFactory::get($this->getItemId(), $this->getVariant(), 1)
];
}
}