mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
Merge branch 'next-major' into modern-world-support
This commit is contained in:
@ -28,6 +28,7 @@ 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;
|
||||
@ -53,8 +54,12 @@ final class RuntimeBlockMapping{
|
||||
private BlockStateData $fallbackStateData;
|
||||
private int $fallbackStateId;
|
||||
|
||||
private function __construct(){
|
||||
$contents = Utils::assumeNotFalse(file_get_contents(Path::join(\pocketmine\BEDROCK_DATA_PATH, "canonical_block_states.nbt")), "Missing required resource file");
|
||||
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);
|
||||
$this->blockStateSerializer = GlobalBlockStateHandlers::getSerializer();
|
||||
|
||||
|
Reference in New Issue
Block a user