PocketMine-MP 5.23.3 git-4a4572131f27ab967701ceaaf2020cfbe26e375c
|
Public Member Functions | |
__construct (private ItemIdMetaUpgrader $idMetaUpgrader, private LegacyItemIdToStringIdMap $legacyIntToStringIdMap, private R12ItemIdToBlockIdMap $r12ItemIdToBlockIdMap, private BlockDataUpgrader $blockDataUpgrader, private BlockItemIdMap $blockItemIdMap, private BlockStateDictionary $blockStateDictionary) | |
getIdMetaUpgrader () | |
upgradeItemStackNbt (CompoundTag $tag) | |
upgradeItemTypeDataInt (int $legacyNumericId, int $meta, int $count, ?CompoundTag $nbt) | |
upgradeItemTypeDataString (string $rawNameId, int $meta, int $count, ?CompoundTag $nbt) | |
Definition at line 43 of file ItemDataUpgrader.php.
pocketmine\data\bedrock\item\upgrade\ItemDataUpgrader::__construct | ( | private ItemIdMetaUpgrader | $idMetaUpgrader, |
private LegacyItemIdToStringIdMap | $legacyIntToStringIdMap, | ||
private R12ItemIdToBlockIdMap | $r12ItemIdToBlockIdMap, | ||
private BlockDataUpgrader | $blockDataUpgrader, | ||
private BlockItemIdMap | $blockItemIdMap, | ||
private BlockStateDictionary | $blockStateDictionary ) |
Definition at line 46 of file ItemDataUpgrader.php.
pocketmine\data\bedrock\item\upgrade\ItemDataUpgrader::getIdMetaUpgrader | ( | ) |
Definition at line 224 of file ItemDataUpgrader.php.
pocketmine\data\bedrock\item\upgrade\ItemDataUpgrader::upgradeItemStackNbt | ( | CompoundTag | $tag | ) |
SavedDataLoadingException |
Definition at line 195 of file ItemDataUpgrader.php.
pocketmine\data\bedrock\item\upgrade\ItemDataUpgrader::upgradeItemTypeDataInt | ( | int | $legacyNumericId, |
int | $meta, | ||
int | $count, | ||
?CompoundTag | $nbt ) |
This function replaces the legacy ItemFactory::get().
SavedDataLoadingException | if the legacy numeric ID doesn't map to a string ID |
Definition at line 94 of file ItemDataUpgrader.php.
pocketmine\data\bedrock\item\upgrade\ItemDataUpgrader::upgradeItemTypeDataString | ( | string | $rawNameId, |
int | $meta, | ||
int | $count, | ||
?CompoundTag | $nbt ) |
This function replaces the legacy ItemFactory::get().
Unlike ItemFactory::get(), it returns a SavedItemStackData which you can do with as you please. If you want to deserialize it into a PocketMine-MP itemstack, pass it to the ItemDeserializer.
Definition at line 63 of file ItemDataUpgrader.php.