diff --git a/src/block/inventory/BrewingStandInventory.php b/src/block/inventory/BrewingStandInventory.php index d171b5905..0faf4b672 100644 --- a/src/block/inventory/BrewingStandInventory.php +++ b/src/block/inventory/BrewingStandInventory.php @@ -29,6 +29,12 @@ use pocketmine\world\Position; class BrewingStandInventory extends SimpleInventory implements BlockInventory{ use BlockInventoryTrait; + public const SLOT_INGREDIENT = 0; + public const SLOT_BOTTLE_LEFT = 1; + public const SLOT_BOTTLE_MIDDLE = 2; + public const SLOT_BOTTLE_RIGHT = 3; + public const SLOT_FUEL = 4; + public function __construct(Position $holder, int $size = 5){ $this->holder = $holder; parent::__construct($size); diff --git a/src/block/inventory/EnchantInventory.php b/src/block/inventory/EnchantInventory.php index 9bd72da27..aafc90caf 100644 --- a/src/block/inventory/EnchantInventory.php +++ b/src/block/inventory/EnchantInventory.php @@ -30,6 +30,9 @@ use pocketmine\world\Position; class EnchantInventory extends SimpleInventory implements BlockInventory{ use BlockInventoryTrait; + public const SLOT_INPUT = 0; + public const SLOT_LAPIS = 1; + public function __construct(Position $holder){ $this->holder = $holder; parent::__construct(2); diff --git a/src/block/inventory/FurnaceInventory.php b/src/block/inventory/FurnaceInventory.php index bece0b61c..5f3a685ea 100644 --- a/src/block/inventory/FurnaceInventory.php +++ b/src/block/inventory/FurnaceInventory.php @@ -31,6 +31,10 @@ use pocketmine\world\Position; class FurnaceInventory extends SimpleInventory implements BlockInventory{ use BlockInventoryTrait; + public const SLOT_INPUT = 0; + public const SLOT_FUEL = 1; + public const SLOT_RESULT = 2; + private FurnaceType $furnaceType; public function __construct(Position $holder, FurnaceType $furnaceType){ @@ -42,26 +46,26 @@ class FurnaceInventory extends SimpleInventory implements BlockInventory{ public function getFurnaceType() : FurnaceType{ return $this->furnaceType; } public function getResult() : Item{ - return $this->getItem(2); + return $this->getItem(self::SLOT_RESULT); } public function getFuel() : Item{ - return $this->getItem(1); + return $this->getItem(self::SLOT_FUEL); } public function getSmelting() : Item{ - return $this->getItem(0); + return $this->getItem(self::SLOT_INPUT); } public function setResult(Item $item) : void{ - $this->setItem(2, $item); + $this->setItem(self::SLOT_RESULT, $item); } public function setFuel(Item $item) : void{ - $this->setItem(1, $item); + $this->setItem(self::SLOT_FUEL, $item); } public function setSmelting(Item $item) : void{ - $this->setItem(0, $item); + $this->setItem(self::SLOT_INPUT, $item); } }