|
PocketMine-MP 5.41.1 git-dec84fe67dc3319e33f5066e5d03b16f00f2ff4c
|
Collaboration diagram for pocketmine\data\bedrock\item\upgrade\ItemDataUpgrader: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 41 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 44 of file ItemDataUpgrader.php.
| pocketmine\data\bedrock\item\upgrade\ItemDataUpgrader::getIdMetaUpgrader | ( | ) |
Definition at line 202 of file ItemDataUpgrader.php.
| pocketmine\data\bedrock\item\upgrade\ItemDataUpgrader::upgradeItemStackNbt | ( | CompoundTag | $tag | ) |
| SavedDataLoadingException |
Definition at line 173 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 92 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 61 of file ItemDataUpgrader.php.