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

@ -24,10 +24,6 @@ declare(strict_types=1);
namespace pocketmine\block;
use pocketmine\block\utils\PillarRotationTrait;
use pocketmine\item\Item;
use pocketmine\math\Facing;
use pocketmine\math\Vector3;
use pocketmine\Player;
class Wood extends Solid{
use PillarRotationTrait;
@ -41,11 +37,6 @@ class Wood extends Solid{
return 2;
}
public function place(Item $item, Block $blockReplace, Block $blockClicked, int $face, Vector3 $clickVector, Player $player = null) : bool{
$this->axis = Facing::axis($face);
return parent::place($item, $blockReplace, $blockClicked, $face, $clickVector, $player);
}
public function getToolType() : int{
return BlockToolType::TYPE_AXE;
}