mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
ItemFactory::get() now consistently throws SavedDataLoadingException on any error, including unknown items
This commit is contained in:
@ -102,6 +102,8 @@ final class ItemDataUpgrader{
|
||||
|
||||
/**
|
||||
* This function replaces the legacy ItemFactory::get().
|
||||
*
|
||||
* @throws SavedDataLoadingException if the legacy numeric ID doesn't map to a string ID
|
||||
*/
|
||||
public function upgradeItemTypeDataInt(int $legacyNumericId, int $meta, int $count, ?CompoundTag $nbt) : SavedItemStackData{
|
||||
$rawNameId = $this->legacyIntToStringIdMap->legacyToString($legacyNumericId);
|
||||
|
Reference in New Issue
Block a user