From a45a96b3ee6baa595d1140a2646d5ef39ccea380 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 21 May 2022 15:40:25 +0100 Subject: [PATCH] ShulkerBoxInventory: fixed inappropriate usage of BlockLegacyIds when comparing item IDS --- src/block/inventory/ShulkerBoxInventory.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/block/inventory/ShulkerBoxInventory.php b/src/block/inventory/ShulkerBoxInventory.php index cace49652..648a0b05f 100644 --- a/src/block/inventory/ShulkerBoxInventory.php +++ b/src/block/inventory/ShulkerBoxInventory.php @@ -23,9 +23,9 @@ declare(strict_types=1); namespace pocketmine\block\inventory; -use pocketmine\block\BlockLegacyIds; use pocketmine\inventory\SimpleInventory; use pocketmine\item\Item; +use pocketmine\item\ItemIds; use pocketmine\network\mcpe\protocol\BlockEventPacket; use pocketmine\network\mcpe\protocol\types\BlockPosition; use pocketmine\world\Position; @@ -50,7 +50,7 @@ class ShulkerBoxInventory extends SimpleInventory implements BlockInventory{ } public function canAddItem(Item $item) : bool{ - if($item->getId() === BlockLegacyIds::UNDYED_SHULKER_BOX || $item->getId() === BlockLegacyIds::SHULKER_BOX){ + if($item->getId() === ItemIds::UNDYED_SHULKER_BOX || $item->getId() === ItemIds::SHULKER_BOX){ return false; } return parent::canAddItem($item);