ソースを参照

feat(ModDownloadLib): 自动创建资源包文件夹

wyc-26 1 年間 前
親
コミット
fa12897ea9

+ 0 - 1
Plain Craft Launcher 2/Modules/Minecraft/ModLaunch.vb

@@ -1954,7 +1954,6 @@ NextVersion:
 
         '离线皮肤资源包
         Try
-            Directory.CreateDirectory(McVersionCurrent.PathIndie & "resourcepacks\")
             Dim ZipFileAddress As String = McVersionCurrent.PathIndie & "resourcepacks\PCL2 Skin.zip"
             Dim NewTypeSetup As Boolean = McVersionCurrent.Version.McCodeMain >= 13 OrElse McVersionCurrent.Version.McCodeMain < 6
             If McLoginLoader.Input.Type = McLoginType.Legacy AndAlso Setup.Get("LaunchSkinType") = 4 AndAlso File.Exists(PathAppdata & "CustomSkin.png") Then

+ 3 - 0
Plain Craft Launcher 2/Pages/PageDownload/ModDownloadLib.vb

@@ -2164,12 +2164,15 @@ Retry:
             If Directory.Exists(TempMcFolder & "libraries") Then CopyDirectory(TempMcFolder & "libraries", PathMcFolder & "libraries")
             Task.Progress = 0.8
             Dim ModsFolder = New McVersion(VersionFolder).PathIndie & "mods\" '版本隔离信息在此时被决定
+            Dim ResourcepacksFolder = New McVersion(VersionFolder).PathIndie & "resourcepacks\"
             If Directory.Exists(ModsTempFolder) Then
                 CopyDirectory(ModsTempFolder, ModsFolder)
             ElseIf Modable Then
                 Directory.CreateDirectory(ModsFolder)
                 Log("[Download] 自动创建 mods 文件夹:" & ModsFolder)
             End If
+            Directory.CreateDirectory(ResourcepacksFolder)
+            Log("[Download] 自动创建 resourcepacks 文件夹:" & ResourcepacksFolder)
         End Sub) With {.ProgressWeight = 2, .Block = True})
         '补全文件
         If Request.OptiFineEntry IsNot Nothing OrElse (Request.ForgeVersion IsNot Nothing AndAlso Request.ForgeVersion.BeforeFirst(".") >= 20) OrElse Request.NeoForgeVersion IsNot Nothing OrElse Request.FabricVersion IsNot Nothing OrElse Request.LiteLoaderEntry IsNot Nothing Then