Phpcraft
|
Public Member Functions | |
__construct (Block &$block, int $state_i, array $properties, array $ids) | |
getId (int $protocol_version) | |
getLegacyMetadata () | |
__toString () | |
getStateString () | |
getCompatible (int $protocol_version) | |
Static Public Member Functions | |
static | getById (int $id, int $protocol_version) |
static | all () |
static | get (string $str) |
Public Attributes | |
$block | |
$properties | |
$ids | |
Phpcraft\World\BlockState::__construct | ( | Block & | $block, |
int | $state_i, | ||
array | $properties, | ||
array | $ids | ||
) |
Phpcraft\World\BlockState::__toString | ( | ) |
|
static |
Returns an array containing every BlockState.
|
static |
Returns a BlockState by its string representation, null if the block is not found, or throws an exception if an invalid state is given.
string | $str | A BlockState string representation, e.g. "grass_block[snowy=true]" |
|
static |
Returns a BlockState by its ID in the given protocol version or null if not found.
int | $id | |
int | $protocol_version |
Phpcraft\World\BlockState::getCompatible | ( | int | $protocol_version | ) |
Gets a replacement BlockState compatible with the given protocol_version, or $this if it's compatible.
int | $protocol_version |
Phpcraft\World\BlockState::getId | ( | int | $protocol_version | ) |
Returns the ID of this BlockState for the given protocol version or null if not applicable.
int | $protocol_version |
Phpcraft\World\BlockState::getLegacyMetadata | ( | ) |
Phpcraft\World\BlockState::getStateString | ( | ) |
Block Phpcraft\World\BlockState::$block |
array< int, int > Phpcraft\World\BlockState::$ids |
array< BlockProperty > Phpcraft\World\BlockState::$properties |