Clean up terminology around block state IDs and their handling

This commit is contained in:
Dylan K. Taylor
2023-01-25 18:53:11 +00:00
parent 2f469ef4a0
commit 0a3ecfdae9
30 changed files with 81 additions and 78 deletions

View File

@ -25,7 +25,7 @@ namespace pocketmine\block\tile;
use pocketmine\block\Air;
use pocketmine\block\Block;
use pocketmine\block\BlockFactory;
use pocketmine\block\RuntimeBlockStateRegistry;
use pocketmine\data\bedrock\block\BlockStateDeserializeException;
use pocketmine\data\bedrock\block\BlockStateNames;
use pocketmine\data\SavedDataLoadingException;
@ -67,7 +67,7 @@ class FlowerPot extends Spawnable{
}catch(BlockStateDeserializeException $e){
throw new SavedDataLoadingException("Error deserializing plant for flower pot: " . $e->getMessage(), 0, $e);
}
$this->setPlant(BlockFactory::getInstance()->fromStateId($blockStateId));
$this->setPlant(RuntimeBlockStateRegistry::getInstance()->fromStateId($blockStateId));
}
}