From 8ad02c9a4e0f2f5ff1431477c2650496d1c2dc54 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Fri, 3 Nov 2017 12:41:24 +0000 Subject: [PATCH] Remove redundant condition from ItemFactory it's unrealistic to have a numeric constant name, so this condition is pointless. --- src/pocketmine/item/ItemFactory.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/pocketmine/item/ItemFactory.php b/src/pocketmine/item/ItemFactory.php index 533870036..d9e3507dc 100644 --- a/src/pocketmine/item/ItemFactory.php +++ b/src/pocketmine/item/ItemFactory.php @@ -355,9 +355,6 @@ class ItemFactory{ if(defined(Item::class . "::" . strtoupper($b[0]))){ $item = self::get(constant(Item::class . "::" . strtoupper($b[0])), $meta); - if($item->getId() === Item::AIR and strtoupper($b[0]) !== "AIR" and is_numeric($b[0])){ - $item = self::get(((int) $b[0]) & 0xFFFF, $meta); - } }elseif(is_numeric($b[0])){ $item = self::get(((int) $b[0]) & 0xFFFF, $meta); }else{