mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-06 03:47:16 +00:00
ItemFactory: fixed bogus usage of BlockFactory::isRegistered()
ItemFactory IDs don't necessarily correspond to BlockFactory ones anymore.
This commit is contained in:
parent
e3a9324e8d
commit
b268818eda
@ -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)]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user