mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-09 11:31:49 +00:00
ShulkerBoxInventory: fixed inappropriate usage of BlockLegacyIds when comparing item IDS
This commit is contained in:
parent
26df37e6ef
commit
a45a96b3ee
@ -23,9 +23,9 @@ declare(strict_types=1);
|
|||||||
|
|
||||||
namespace pocketmine\block\inventory;
|
namespace pocketmine\block\inventory;
|
||||||
|
|
||||||
use pocketmine\block\BlockLegacyIds;
|
|
||||||
use pocketmine\inventory\SimpleInventory;
|
use pocketmine\inventory\SimpleInventory;
|
||||||
use pocketmine\item\Item;
|
use pocketmine\item\Item;
|
||||||
|
use pocketmine\item\ItemIds;
|
||||||
use pocketmine\network\mcpe\protocol\BlockEventPacket;
|
use pocketmine\network\mcpe\protocol\BlockEventPacket;
|
||||||
use pocketmine\network\mcpe\protocol\types\BlockPosition;
|
use pocketmine\network\mcpe\protocol\types\BlockPosition;
|
||||||
use pocketmine\world\Position;
|
use pocketmine\world\Position;
|
||||||
@ -50,7 +50,7 @@ class ShulkerBoxInventory extends SimpleInventory implements BlockInventory{
|
|||||||
}
|
}
|
||||||
|
|
||||||
public function canAddItem(Item $item) : bool{
|
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 false;
|
||||||
}
|
}
|
||||||
return parent::canAddItem($item);
|
return parent::canAddItem($item);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user