From b268818eda0d2fe5660c3870e69506258ef343fa Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sat, 25 Jun 2022 14:02:55 +0100 Subject: [PATCH] ItemFactory: fixed bogus usage of BlockFactory::isRegistered() ItemFactory IDs don't necessarily correspond to BlockFactory ones anymore. --- src/item/ItemFactory.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/item/ItemFactory.php b/src/item/ItemFactory.php index ed992133ae..2f6c8e2d21 100644 --- a/src/item/ItemFactory.php +++ b/src/item/ItemFactory.php @@ -507,7 +507,7 @@ class ItemFactory{ */ public function isRegistered(int $id, int $variant = 0) : bool{ if($id < 256){ - return BlockFactory::getInstance()->isRegistered(self::itemToBlockId($id)); + return GlobalBlockStateHandlers::getUpgrader()->upgradeIntIdMeta(self::itemToBlockId($id), $variant & 0xf) !== null; } return isset($this->list[self::getListOffset($id, $variant)]);