Implemented Blast Furnace and Smoker (#4362)

This commit is contained in:
Dylan T
2021-08-12 23:27:05 +01:00
committed by GitHub
parent 483c16cc41
commit 27e0ecf7ee
14 changed files with 235 additions and 39 deletions

View File

@ -23,6 +23,7 @@ declare(strict_types=1);
namespace pocketmine\block\inventory;
use pocketmine\crafting\FurnaceType;
use pocketmine\inventory\SimpleInventory;
use pocketmine\item\Item;
use pocketmine\world\Position;
@ -30,11 +31,16 @@ use pocketmine\world\Position;
class FurnaceInventory extends SimpleInventory implements BlockInventory{
use BlockInventoryTrait;
public function __construct(Position $holder){
private FurnaceType $furnaceType;
public function __construct(Position $holder, FurnaceType $furnaceType){
$this->holder = $holder;
$this->furnaceType = $furnaceType;
parent::__construct(3);
}
public function getFurnaceType() : FurnaceType{ return $this->furnaceType; }
public function getResult() : Item{
return $this->getItem(2);
}