Rename BlockFactory::fromFullBlock() -> BlockFactory::fromStateId()

This commit is contained in:
Dylan K. Taylor
2022-07-05 13:46:19 +01:00
parent a059d03b37
commit 0a23e91329
12 changed files with 25 additions and 25 deletions

View File

@@ -172,7 +172,7 @@ final class BlockObjectToBlockStateSerializer implements BlockStateSerializer{
public function serialize(int $stateId) : BlockStateData{
//TODO: singleton usage not ideal
return $this->serializeBlock(BlockFactory::getInstance()->fromFullBlock($stateId));
return $this->serializeBlock(BlockFactory::getInstance()->fromStateId($stateId));
}
/**

View File

@@ -76,7 +76,7 @@ final class ItemDeserializer{
}
//TODO: worth caching this or not?
return BlockFactory::getInstance()->fromFullBlock($block)->asItem();
return BlockFactory::getInstance()->fromStateId($block)->asItem();
}
$id = $data->getName();
if(!isset($this->deserializers[$id])){