Skip to content

Commit

Permalink
fix: v2 pack cache (#87)
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonjgardner authored Mar 4, 2024
2 parents 61c3409 + 3ddf607 commit e8603c7
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions v2/installer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -517,19 +517,20 @@ function DownloadPack() {

if (!(Test-Path $dir)) {
New-Item -ItemType Directory -Path $dir -Force | Out-Null
}

try {
$response = Invoke-WebRequest -Uri "https://bedrock.graphics/api/pack/${uuid}" -ContentType "application/json"
$content = $response.Content | ConvertFrom-Json

try {
$response = Invoke-WebRequest -Uri "https://bedrock.graphics/api/pack/${uuid}" -ContentType "application/json"
$content = $response.Content | ConvertFrom-Json

Invoke-WebRequest -Uri $content.stub -OutFile "$dir\RTXStub.material.bin"
Invoke-WebRequest -Uri $content.tonemapping -OutFile "$dir\RTXPostFX.Tonemapping.material.bin"
}
catch {
Write-Host "Failed to get API data for ID ${uuid}: $_"
}
Invoke-WebRequest -Uri $content.stub -OutFile "$dir\RTXStub.material.bin"
Invoke-WebRequest -Uri $content.tonemapping -OutFile "$dir\RTXPostFX.Tonemapping.material.bin"
}
catch {
Write-Host "Failed to get API data for ID ${uuid}: $_"
}


foreach ($mc in $dataSrc) {
if ($ListBox.SelectedItems -notcontains $mc.FriendlyName) {
continue
Expand Down

0 comments on commit e8603c7

Please sign in to comment.