This commit is contained in:
Dylan K. Taylor 2022-04-20 14:58:57 +01:00
parent 43e61336cf
commit 37f0ccdb7e
No known key found for this signature in database
GPG Key ID: 8927471A91CAFD3D

View File

@ -28,7 +28,6 @@ use pocketmine\data\bedrock\blockstate\BlockStateSerializeException;
use pocketmine\data\bedrock\blockstate\BlockStateSerializer;
use pocketmine\data\bedrock\blockstate\BlockTypeNames;
use pocketmine\nbt\tag\CompoundTag;
use pocketmine\network\mcpe\protocol\SimulationTypePacket;
use pocketmine\utils\AssumptionFailedError;
use pocketmine\utils\SingletonTrait;
use pocketmine\utils\Utils;
@ -57,7 +56,7 @@ final class RuntimeBlockMapping{
private static function make() : self{
return new self(Path::join(\pocketmine\BEDROCK_DATA_PATH, "canonical_block_states.nbt"));
}
public function __construct(string $canonicalBlockStatesFile){
$contents = Utils::assumeNotFalse(file_get_contents($canonicalBlockStatesFile), "Missing required resource file");
$this->blockStateDictionary = BlockStateDictionary::loadFromString($contents);