PocketMine-MP 5.21.2 git-a6534ecbbbcf369264567d27e5ed70f7f5be9816
|
Public Member Functions | |
fromStateId (int $stateId) | |
getAllKnownStates () | |
register (Block $block) | |
Public Attributes | |
array | $blastResistance = [] |
array | $blocksDirectSkyLight = [] |
array | $light = [] |
array | $lightFilter = [] |
Blocks are stored as state IDs in chunks at runtime (it would waste far too much memory to represent every block as an object). This class maps block state IDs to their corresponding block objects when reading blocks from chunks at runtime.
Definition at line 40 of file RuntimeBlockStateRegistry.php.
pocketmine\block\RuntimeBlockStateRegistry::__construct | ( | ) |
Definition at line 77 of file RuntimeBlockStateRegistry.php.
pocketmine\block\RuntimeBlockStateRegistry::fromStateId | ( | int | $stateId | ) |
Definition at line 118 of file RuntimeBlockStateRegistry.php.
pocketmine\block\RuntimeBlockStateRegistry::getAllKnownStates | ( | ) |
Definition at line 136 of file RuntimeBlockStateRegistry.php.
pocketmine\block\RuntimeBlockStateRegistry::register | ( | Block | $block | ) |
Maps a block type's state permutations to its corresponding state IDs. This is necessary for the block to be recognized when fetching it by its state ID from chunks at runtime.
InvalidArgumentException if the desired block type ID is already registered
Definition at line 89 of file RuntimeBlockStateRegistry.php.
array pocketmine\block\RuntimeBlockStateRegistry::$blastResistance = [] |
Definition at line 75 of file RuntimeBlockStateRegistry.php.
array pocketmine\block\RuntimeBlockStateRegistry::$blocksDirectSkyLight = [] |
Definition at line 70 of file RuntimeBlockStateRegistry.php.
array pocketmine\block\RuntimeBlockStateRegistry::$light = [] |
Definition at line 60 of file RuntimeBlockStateRegistry.php.
array pocketmine\block\RuntimeBlockStateRegistry::$lightFilter = [] |
Definition at line 65 of file RuntimeBlockStateRegistry.php.