look for item IDs in ItemIds instead of Item

Item is likely to be more polluted by other constants which aren't item IDs.
This commit is contained in:
Dylan K. Taylor 2017-11-03 12:42:51 +00:00
parent 8ad02c9a4e
commit e95b1d4b00

View File

@ -353,8 +353,8 @@ class ItemFactory{
$meta = $b[1] & 0xFFFF;
}
if(defined(Item::class . "::" . strtoupper($b[0]))){
$item = self::get(constant(Item::class . "::" . strtoupper($b[0])), $meta);
if(defined(ItemIds::class . "::" . strtoupper($b[0]))){
$item = self::get(constant(ItemIds::class . "::" . strtoupper($b[0])), $meta);
}elseif(is_numeric($b[0])){
$item = self::get(((int) $b[0]) & 0xFFFF, $meta);
}else{