@echo off title SqushMC Mod Autoloader (NeoForge 1.21.1) setlocal set "TARGET=%~1" if "%TARGET%"=="" set "TARGET=%APPDATA%\.minecraft\mods" echo ============================================ echo SqushMC Mod Autoloader - NeoForge 1.21.1 echo Server: minecraft.sqush.dev echo ============================================ echo. echo Zielordner: "%TARGET%" echo. powershell -NoProfile -ExecutionPolicy Bypass -Command ^ "$ErrorActionPreference = 'Stop';" ^ "$modsDir = '%TARGET%';" ^ "if (-not (Test-Path $modsDir)) { New-Item -ItemType Directory -Force -Path $modsDir | Out-Null };" ^ "Write-Host 'Lade Mod-Liste von https://mods.sqush.dev/manifest.json ...' -ForegroundColor Cyan;" ^ "$manifest = Invoke-RestMethod 'https://mods.sqush.dev/manifest.json';" ^ "$active = $manifest.mods | Where-Object { $_.enabled -eq $true };" ^ "$expected = @{};" ^ "foreach ($m in $active) { $expected[$m.filename] = $m };" ^ "Get-ChildItem -Path $modsDir -Filter '*.jar' | ForEach-Object {" ^ " if (-not $expected.ContainsKey($_.Name)) {" ^ " Write-Host \"[Entferne] $($_.Name)\" -ForegroundColor Yellow;" ^ " Remove-Item $_.FullName -Force;" ^ " }" ^ "};" ^ "$i = 0; $total = $active.Count;" ^ "foreach ($m in $active) {" ^ " $i++;" ^ " $dest = Join-Path $modsDir $m.filename;" ^ " $need = $true;" ^ " if (Test-Path $dest) {" ^ " $hash = (Get-FileHash -Path $dest -Algorithm SHA256).Hash.ToLower();" ^ " if ($hash -eq $m.sha256.ToLower()) { $need = $false }" ^ " }" ^ " if ($need) {" ^ " Write-Host \"[$i/$total] Lade $($m.title)...\" -ForegroundColor Green;" ^ " Invoke-WebRequest -Uri $m.url -OutFile $dest -UseBasicParsing;" ^ " }" ^ "};" ^ "Write-Host '';" ^ "Write-Host \"Fertig! $($active.Count) Mods synchronisiert.\" -ForegroundColor Green;" ^ "$nfDir = Join-Path $env:APPDATA '.minecraft\versions';" ^ "if ((Test-Path $nfDir) -and -not (Get-ChildItem $nfDir -Filter '*neoforge*1.21.1*' -ErrorAction SilentlyContinue) -and -not (Get-ChildItem $nfDir -Filter 'neoforge-21.1*' -ErrorAction SilentlyContinue)) {" ^ " Write-Host '';" ^ " Write-Host 'Hinweis: NeoForge 1.21.1 wurde noch nicht in .minecraft\versions gefunden!' -ForegroundColor Yellow;" ^ " Write-Host 'Falls du den normalen Minecraft Launcher nutzt, lade NeoForge 1.21.1 hier herunter:' -ForegroundColor Yellow;" ^ " Write-Host 'https://neoforged.net/' -ForegroundColor Cyan;" ^ "}" echo. echo Du kannst Minecraft jetzt starten und auf minecraft.sqush.dev joinen! pause