Merge branch 'next-major' into modern-world-support

This commit is contained in:
Dylan K. Taylor
2022-05-22 16:21:48 +01:00
33 changed files with 228 additions and 46 deletions

View File

@ -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);