BlockStateToBlockObjectDeserializer: make map() public

this allows plugins to implement their own blocks using this deserializer.
This commit is contained in:
Dylan K. Taylor 2022-06-23 19:40:11 +01:00
parent 6964012464
commit adf8a61814
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -62,7 +62,7 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
}
/** @phpstan-param \Closure(Reader) : Block $c */
private function map(string $id, \Closure $c) : void{
public function map(string $id, \Closure $c) : void{
if(array_key_exists($id, $this->deserializeFuncs)){
throw new \InvalidArgumentException("Deserializer is already assigned for \"$id\"");
}