Removed type-hint silently breaking use of CompoundTags in Item::get()

This commit is contained in:
Dylan K. Taylor 2017-03-06 19:45:49 +00:00
parent f204422432
commit fc5fa01442

View File

@ -291,7 +291,17 @@ class Item implements ItemIds, \JsonSerializable{
return -1;
}
public static function get(int $id, int $meta = 0, int $count = 1, string $tags = "") : Item{
/**
* Returns an instance of the Item with the specified id, meta, count and NBT.
*
* @param int $id
* @param int $meta
* @param int $count
* @param CompoundTag|string $tags
*
* @return Item
*/
public static function get(int $id, int $meta = 0, int $count = 1, $tags = "") : Item{
try{
$class = self::$list[$id];
if($class === null){