From 130a60f2b2f87d9f31af1e6217f15a12bccb011c Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Mon, 11 Sep 2017 18:23:26 +0100 Subject: [PATCH] Fixed ItemFactory::isRegistered() returns false for blocks --- src/pocketmine/item/ItemFactory.php | 3 +++ tests/plugins/PocketMine-TesterPlugin | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/pocketmine/item/ItemFactory.php b/src/pocketmine/item/ItemFactory.php index 6075dfe82..f0e12cdc2 100644 --- a/src/pocketmine/item/ItemFactory.php +++ b/src/pocketmine/item/ItemFactory.php @@ -358,6 +358,9 @@ class ItemFactory{ * @return bool */ public static function isRegistered(int $id) : bool{ + if($id < 256){ + return BlockFactory::isRegistered($id); + } return self::$list[$id] !== null; } } \ No newline at end of file diff --git a/tests/plugins/PocketMine-TesterPlugin b/tests/plugins/PocketMine-TesterPlugin index c568b5ec9..6bd229348 160000 --- a/tests/plugins/PocketMine-TesterPlugin +++ b/tests/plugins/PocketMine-TesterPlugin @@ -1 +1 @@ -Subproject commit c568b5ec9bd0606f0334d28ba60b0fc6c624a8f9 +Subproject commit 6bd229348533ec9c46e38d24ce0c0da66b759e67