BlockStateData: introduce and use current()

This commit is contained in:
Dylan K. Taylor
2023-02-02 16:21:50 +00:00
parent 6b7a4e2c41
commit da5302ca86
6 changed files with 13 additions and 5 deletions

View File

@ -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; }
/**