|
PocketMine-MP 5.42.1 git-d77520d210fcb967a02bc11817ad625393c8ebc6
|
Collaboration diagram for pocketmine\network\mcpe\convert\BlockStateDictionary:Public Member Functions | |
| __construct (private array $states) | |
| generateDataFromStateId (int $networkRuntimeId) | |
| getMetaFromStateId (int $networkRuntimeId) | |
| getStates () | |
| lookupStateIdFromData (BlockStateData $data) | |
| lookupStateIdFromIdMeta (string $id, int $meta) | |
Static Public Member Functions | |
| static | loadFromString (string $blockPaletteContents, string $metaMapContents) |
| static | loadPaletteFromString (string $blockPaletteContents) |
Handles translation of network block runtime IDs into blockstate data, and vice versa
Definition at line 45 of file BlockStateDictionary.php.
| pocketmine\network\mcpe\convert\BlockStateDictionary::__construct | ( | private array | $states | ) |
| BlockStateDictionaryEntry[] | $states |
@phpstan-param list<BlockStateDictionaryEntry> $states
Definition at line 63 of file BlockStateDictionary.php.
| pocketmine\network\mcpe\convert\BlockStateDictionary::generateDataFromStateId | ( | int | $networkRuntimeId | ) |
Definition at line 108 of file BlockStateDictionary.php.
| pocketmine\network\mcpe\convert\BlockStateDictionary::getMetaFromStateId | ( | int | $networkRuntimeId | ) |
Returns the blockstate meta value associated with the given blockstate runtime ID. This is used for serializing crafting recipe inputs.
Definition at line 131 of file BlockStateDictionary.php.
| pocketmine\network\mcpe\convert\BlockStateDictionary::getStates | ( | ) |
Returns an array mapping runtime ID => blockstate data.
Definition at line 153 of file BlockStateDictionary.php.
|
static |
Definition at line 168 of file BlockStateDictionary.php.
|
static |
| NbtDataException |
Definition at line 161 of file BlockStateDictionary.php.
| pocketmine\network\mcpe\convert\BlockStateDictionary::lookupStateIdFromData | ( | BlockStateData | $data | ) |
Searches for the appropriate state ID which matches the given blockstate NBT. Returns null if there were no matches.
Definition at line 116 of file BlockStateDictionary.php.
References pocketmine\data\bedrock\block\BlockStateData\getStates().
Here is the call graph for this function:| pocketmine\network\mcpe\convert\BlockStateDictionary::lookupStateIdFromIdMeta | ( | string | $id, |
| int | $meta ) |
Returns the blockstate data associated with the given block ID and meta value. This is used for deserializing crafting recipe inputs.
Definition at line 139 of file BlockStateDictionary.php.