forked from mirrors/kolyah35-minecraft-pe-0.6.1
- Infinite world: streamed chunk cache, multi-region storage (old chunks.dat still loads), per-chunk entity/tile entity persistence, client chunk streaming, protocol version 10, view-distance server property - LuaJIT mod host (mods/, lua/prelude.lua) with events, commands, world and player API; WorldEdit command set ported to it (mods/worldedit) - /skin command, SetSkinPacket and bundled skins - OGG music player (data/music is ignored, tools/convert-music.ps1) - package-windows.ps1 builds client and dedicated server for Windows Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
23 lines
1,017 B
PowerShell
23 lines
1,017 B
PowerShell
<#
|
|
Converts FLAC/MP3/WAV files to the OGG Vorbis tracks the game plays from data\music.
|
|
|
|
.\tools\convert-music.ps1 -Source "F:\Music\Minecraft - Volume Alpha" -Prefix alpha
|
|
.\tools\convert-music.ps1 -Source "F:\Music\Minecraft - Volume Beta" -Prefix beta
|
|
|
|
Needs ffmpeg (with libvorbis) in PATH. Every .ogg in data\music is shuffled by the
|
|
in-game music player, volume is the "Music" slider in the options.
|
|
#>
|
|
param(
|
|
[Parameter(Mandatory)] [string]$Source,
|
|
[string]$Prefix = 'track',
|
|
[string]$Out = (Join-Path $PSScriptRoot '..\data\music')
|
|
)
|
|
New-Item -ItemType Directory -Force $Out | Out-Null
|
|
Get-ChildItem -LiteralPath $Source -Include *.flac, *.mp3, *.wav, *.m4a -Recurse | ForEach-Object {
|
|
$name = ($_.BaseName -replace '[^\w\- ]', '') -replace '\s+', '_'
|
|
$dst = Join-Path $Out "${Prefix}_$name.ogg"
|
|
if (-not (Test-Path $dst)) {
|
|
& ffmpeg -loglevel error -y -i $_.FullName -vn -map_metadata -1 -acodec libvorbis -aq 4 -ar 44100 -ac 2 $dst
|
|
Write-Host $dst
|
|
}
|
|
}
|