mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
BlockStateData: introduce and use current()
This commit is contained in:
@ -58,6 +58,14 @@ final class BlockStateData{
|
||||
private int $version
|
||||
){}
|
||||
|
||||
/**
|
||||
* @param Tag[] $states
|
||||
* @phpstan-param array<string, Tag> $states
|
||||
*/
|
||||
public static function current(string $name, array $states) : self{
|
||||
return new self($name, $states, self::CURRENT_VERSION);
|
||||
}
|
||||
|
||||
public function getName() : string{ return $this->name; }
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user