mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-09 11:31:49 +00:00
BlockStateToBlockObjectDeserializer: make map() public
this allows plugins to implement their own blocks using this deserializer.
This commit is contained in:
parent
6964012464
commit
adf8a61814
@ -62,7 +62,7 @@ final class BlockStateToBlockObjectDeserializer implements BlockStateDeserialize
|
|||||||
}
|
}
|
||||||
|
|
||||||
/** @phpstan-param \Closure(Reader) : Block $c */
|
/** @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)){
|
if(array_key_exists($id, $this->deserializeFuncs)){
|
||||||
throw new \InvalidArgumentException("Deserializer is already assigned for \"$id\"");
|
throw new \InvalidArgumentException("Deserializer is already assigned for \"$id\"");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user