Skip to content

Commit 5fb7b63

Browse files
Merge pull request #34 from EnigmaticaModpacks/third-party-mod-support
added basic support for adding third party mods to client files
2 parents a0167fe + b331199 commit 5fb7b63

2 files changed

Lines changed: 18 additions & 3 deletions

File tree

modpack-uploader.ps1

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,17 @@ function New-ClientFiles {
107107
Copy-Item -Path $_ -Destination "$overridesFolder/$_" -Recurse
108108
}
109109

110+
$destinationFolder = "$overridesFolder/mods"
111+
if (!(Test-Path -Path $destinationFolder)) {
112+
New-Item $destinationFolder -Type Directory
113+
}
114+
$FILES_TO_INCLUDE_IN_MODS_FOLDER_IN_CLIENT_FILES | ForEach-Object {
115+
Write-Host "Adding " -ForegroundColor Cyan -NoNewline
116+
Write-Host $_ -ForegroundColor Blue -NoNewline
117+
Write-Host " to the mods folder in the client files." -ForegroundColor Cyan
118+
Copy-Item -Path $_ -Destination "$overridesFolder/$_" -Recurse
119+
}
120+
110121
Remove-BlacklistedFiles
111122

112123
# Zipping up the newly created overrides folder and $manifest
@@ -363,9 +374,9 @@ function New-GitHubRelease {
363374
};
364375

365376
$Body = @{
366-
tag_name = $MODPACK_VERSION
367-
name = $MODPACK_VERSION
368-
generate_release_notes = $true
377+
tag_name = $MODPACK_VERSION
378+
name = $MODPACK_VERSION
379+
generate_release_notes = $true
369380
} | ConvertTo-Json
370381

371382

settings.ps1

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ $CONFIGS_TO_REMOVE_FROM_CLIENT_FILES = @()
9494

9595
$FOLDERS_TO_REMOVE_FROM_CLIENT_FILES = @("local/ftbutilities", "resourcepacks")
9696

97+
# Example:
98+
# $FILES_TO_INCLUDE_IN_MODS_FOLDER_IN_CLIENT_FILES = @("mods/Apotheosis-1.19.2-6.2.1.jar", "mods/create-1.19.2-0.5.1.b.jar")
99+
$FILES_TO_INCLUDE_IN_MODS_FOLDER_IN_CLIENT_FILES = @()
100+
97101
#=====================================================================//
98102
# SERVER FILE SETTINGS
99103
#=====================================================================//

0 commit comments

Comments
 (0)