|
Phpcraft
|
Public Member Functions | |
| getState (string $state_string="") | |
| getStateFromArray (array $properties) | |
Static Public Member Functions | |
| static | get (string $name) |
| static | all () |
Public Attributes | |
| $name | |
| $since_protocol_version | |
| $display_name | |
| $properties = [] | |
| $states = [] | |
| $legacy_id | |
Protected Member Functions | |
| __construct (string $name, int $since_protocol_version, $display_name) | |
|
protected |
|
static |
Returns an array containing every Block.
|
static |
| Phpcraft\World\Block::getState | ( | string | $state_string = "" | ) |
Gets a BlockState using the given property string.
| string | $state_string | A string in the format of "[facing=west][waterlogged=true]". Default values will be used for properties that are not given. |
| InvalidArgumentException | If an invalid state string, property name, or property value was given. |
| Phpcraft\World\Block::getStateFromArray | ( | array | $properties | ) |
Gets a BlockState using the given associative string array.
| array<string,string> | $properties Associative array containing the properties of the state. Default values will be used for properties that are not given. |
| InvalidArgumentException | If an invalid property name or value was given. |
| string null Phpcraft\World\Block::$display_name |
| Phpcraft\World\Block::$legacy_id |
| string Phpcraft\World\Block::$name |
| Phpcraft\World\Block::$properties = [] |
| int Phpcraft\World\Block::$since_protocol_version |
| Phpcraft\World\Block::$states = [] |
1.8.17