*/ private static function loadCompoundFromFile(string $filePath) : CacheableNbt{ return new CacheableNbt((new NetworkNbtSerializer())->read(Filesystem::fileGetContents($filePath))->mustGetCompoundTag()); } private static function make() : self{ return new self( BiomeDefinitionListPacket::create(self::loadCompoundFromFile(Path::join(\pocketmine\BEDROCK_DATA_PATH, 'biome_definitions.nbt'))), AvailableActorIdentifiersPacket::create(self::loadCompoundFromFile(Path::join(\pocketmine\BEDROCK_DATA_PATH, 'entity_identifiers.nbt'))) ); } public function __construct( private BiomeDefinitionListPacket $biomeDefs, private AvailableActorIdentifiersPacket $availableActorIdentifiers ){} public function getBiomeDefs() : BiomeDefinitionListPacket{ return $this->biomeDefs; } public function getAvailableActorIdentifiers() : AvailableActorIdentifiersPacket{ return $this->availableActorIdentifiers; } }