PocketMine-MP 5.18.1 git-9381fc4172e5dce4cada1cb356050c8a2ab57b94
|
Public Member Functions | |
__construct (array $itemToBlock) | |
blockIdToItemId (string $blockId) | |
itemIdToBlockId (string $itemId) | |
Maps all known 1.12 and lower item IDs to their respective block IDs, where appropriate. If an item ID does not have a corresponding 1.12 block ID, assume the item is not a blockitem.
This is only needed for deserializing blockitems from 1.8 and lower (or 1.12 and lower in the case of PM). In 1.9 and above, the blockstate NBT is stored in the itemstack NBT, and the item ID is not used.
Definition at line 45 of file R12ItemIdToBlockIdMap.php.
pocketmine\data\bedrock\item\upgrade\R12ItemIdToBlockIdMap::__construct | ( | array | $itemToBlock | ) |
string[] | $itemToBlock | @phpstan-param array<string, string> $itemToBlock |
Definition at line 87 of file R12ItemIdToBlockIdMap.php.
References pocketmine\utils\Utils\stringifyKeys().
pocketmine\data\bedrock\item\upgrade\R12ItemIdToBlockIdMap::blockIdToItemId | ( | string | $blockId | ) |
Definition at line 98 of file R12ItemIdToBlockIdMap.php.
pocketmine\data\bedrock\item\upgrade\R12ItemIdToBlockIdMap::itemIdToBlockId | ( | string | $itemId | ) |
Definition at line 94 of file R12ItemIdToBlockIdMap.php.