PocketMine-MP 5.25.1 git-694aa17cc916a954b10fe12721c81b1dc73eecd5
|
Public Member Functions | |
fromStateId (int $stateId) | |
getAllKnownStates () | |
register (Block $block) | |
Public Attributes | |
array | $blastResistance = [] |
array | $blocksDirectSkyLight = [] |
array | $collisionInfo = [] |
array | $light = [] |
array | $lightFilter = [] |
const | COLLISION_CUBE = 1 |
const | COLLISION_CUSTOM = 0 |
const | COLLISION_MAY_OVERFLOW = 3 |
const | COLLISION_NONE = 2 |
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 41 of file RuntimeBlockStateRegistry.php.
pocketmine\block\RuntimeBlockStateRegistry::__construct | ( | ) |
Definition at line 90 of file RuntimeBlockStateRegistry.php.
pocketmine\block\RuntimeBlockStateRegistry::fromStateId | ( | int | $stateId | ) |
Definition at line 197 of file RuntimeBlockStateRegistry.php.
pocketmine\block\RuntimeBlockStateRegistry::getAllKnownStates | ( | ) |
Definition at line 216 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 102 of file RuntimeBlockStateRegistry.php.
array pocketmine\block\RuntimeBlockStateRegistry::$blastResistance = [] |
Definition at line 81 of file RuntimeBlockStateRegistry.php.
array pocketmine\block\RuntimeBlockStateRegistry::$blocksDirectSkyLight = [] |
Definition at line 76 of file RuntimeBlockStateRegistry.php.
array pocketmine\block\RuntimeBlockStateRegistry::$collisionInfo = [] |
Definition at line 88 of file RuntimeBlockStateRegistry.php.
array pocketmine\block\RuntimeBlockStateRegistry::$light = [] |
Definition at line 66 of file RuntimeBlockStateRegistry.php.
array pocketmine\block\RuntimeBlockStateRegistry::$lightFilter = [] |
Definition at line 71 of file RuntimeBlockStateRegistry.php.
const pocketmine\block\RuntimeBlockStateRegistry::COLLISION_CUBE = 1 |
Definition at line 45 of file RuntimeBlockStateRegistry.php.
const pocketmine\block\RuntimeBlockStateRegistry::COLLISION_CUSTOM = 0 |
Definition at line 44 of file RuntimeBlockStateRegistry.php.
const pocketmine\block\RuntimeBlockStateRegistry::COLLISION_MAY_OVERFLOW = 3 |
Definition at line 47 of file RuntimeBlockStateRegistry.php.
const pocketmine\block\RuntimeBlockStateRegistry::COLLISION_NONE = 2 |
Definition at line 46 of file RuntimeBlockStateRegistry.php.