mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-20 16:00:20 +00:00
BlockStateData: added getVersionAsString()
This commit is contained in:
parent
f03afba10e
commit
a123194368
@ -80,6 +80,14 @@ final class BlockStateData{
|
||||
|
||||
public function getVersion() : int{ return $this->version; }
|
||||
|
||||
public function getVersionAsString() : string{
|
||||
$major = ($this->version >> 24) & 0xff;
|
||||
$minor = ($this->version >> 16) & 0xff;
|
||||
$patch = ($this->version >> 8) & 0xff;
|
||||
$revision = $this->version & 0xff;
|
||||
return "$major.$minor.$patch.$revision";
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws BlockStateDeserializeException
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user