Launching Minecraft 1.7.4 from the command-line

Gene Goykhman
  • Launching Minecraft 1.7.4 from the command-line Gene Goykhman

    In the past I have been able to launch Minecraft 1.6 from the command-line, bypassing the launcher, and everything worked great. With Minecraft 1.7.4 I can get almost all the way there, but I don't have any sound in-game. Instead, I see Unable to play unknown soundEvent errors in the trace.

    Starting Minecraft from the launcher works fine, sound and all. This is on Windows 7 64-bit.

    Here's the command-line I am using (username/session removed):

    cd \Users\RLUser\AppData\Roaming\.minecraft
    
    "C:\Program Files\Java\jre6\bin\java.exe" -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -Djava.library.path=C:\Users\RLUser\AppData\Roaming\.minecraft\versions\1.7.4\snapshot -cp C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\java3d\vecmath\1.3.1\vecmath-1.3.1.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\com\ibm\icu\icu4j-core-mojang\51.2\icu4j-core-mojang-51.2.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\net\sf\jopt-simple\jopt-simple\4.5\jopt-simple-4.5.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\com\paulscode\codecjorbis\20101023\codecjorbis-20101023.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\com\paulscode\codecwav\20101023\codecwav-20101023.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\com\paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\com\paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\com\paulscode\soundsystem\20120107\soundsystem-20120107.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\io\netty\netty-all\4.0.10.Final\netty-all-4.0.10.Final.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\com\google\guava\guava\15.0\guava-15.0.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\org\apache\commons\commons-lang3\3.1\commons-lang3-3.1.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\commons-io\commons-io\2.4\commons-io-2.4.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\net\java\jinput\jinput\2.0.5\jinput-2.0.5.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\net\java\jutils\jutils\1.0.0\jutils-1.0.0.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\com\google\code\gson\gson\2.2.4\gson-2.2.4.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\com\mojang\authlib\1.2\authlib-1.2.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\org\apache\logging\log4j\log4j-api\2.0-beta9\log4j-api-2.0-beta9.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\org\apache\logging\log4j\log4j-core\2.0-beta9\log4j-core-2.0-beta9.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl\2.9.1-nightly-20131120\lwjgl-2.9.1-nightly-20131120.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\org\lwjgl\lwjgl\lwjgl_util\2.9.1-nightly-20131120\lwjgl_util-2.9.1-nightly-20131120.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\libraries\tv\twitch\twitch\5.12\twitch-5.12.jar;C:\Users\RLUser\AppData\Roaming\.minecraft\versions\1.7.4\1.7.4.jar net.minecraft.client.main.Main --username myusername --accessToken myaccesstoken --userProperties {} --version 1.7.4 --gameDir C:\Users\RLUser\AppData\Roaming\.minecraft --assetsDir C:\Users\RLUser\AppData\Roaming\.minecraft\assets
    

    Here's the console trace with the sound errors:

    C:\Users\RLUser\bin>cd \Users\RLUser\AppData\Roaming\.minecraft 
    [20:41:30] [main/INFO]: Setting user: myusername
    [20:41:30] [main/INFO]: (Session ID is token:myaccesstoken:myusername)
    [20:41:30] [Client thread/INFO]: LWJGL Version: 2.9.1
    [20:41:30] [Client thread/INFO]: Reloading ResourceManager: Default
    
    Starting up SoundSystem...
    Initializing LWJGL OpenAL
        (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
    OpenAL initialized.
    [20:41:31] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
    
    [20:41:31] [Sound Library Loader/INFO]: Sound engine started
    [20:41:31] [Client thread/INFO]: Created: 256x256 textures/items-atlas
    [20:41:31] [MCO Availability Checker #1/ERROR]: Couldn't connect to Realms
    [20:41:36] [Client thread/WARN]: Unable to play unknown soundEvent: minecraft:music.menu
    [20:41:37] [Client thread/WARN]: Unable to play unknown soundEvent: minecraft:gui.button.press
    [20:41:38] [Server thread/INFO]: Starting integrated minecraft server version 1.7.4
    [20:41:38] [Server thread/INFO]: Generating keypair
    [20:41:39] [Server thread/INFO]: Preparing start region for level 0
    [20:41:39] [Server thread/INFO]: Changing view distance to 12, from 10
    [20:41:39] [Server thread/INFO]: myusername[local:E:2d9f08ca] logged in with entity id 322 at (-206.89310612784573, 63.0, -122.53532329598148)
    [20:41:39] [Server thread/INFO]: myusername joined the game
    [20:41:39] [Client thread/WARN]: Unable to play unknown soundEvent: minecraft:gui.button.press
    [20:41:43] [Client thread/WARN]: Unable to play unknown soundEvent: minecraft:step.stone
    [20:41:44] [Client thread/WARN]: Unable to play unknown soundEvent: minecraft:step.stone
    [20:41:45] [Client thread/WARN]: Unable to play unknown soundEvent: minecraft:step.stone
    [20:41:46] [Client thread/WARN]: Unable to play unknown soundEvent: minecraft:step.stone
    [20:41:47] [Client thread/WARN]: Unable to play unknown soundEvent: minecraft:liquid.water
    [20:41:47] [Server thread/INFO]: Saving and pausing game...
    [20:41:47] [Server thread/INFO]: Saving chunks for level 'My World'/Overworld
    [20:41:47] [Server thread/INFO]: Saving chunks for level 'My World'/Nether
    [20:41:47] [Server thread/INFO]: Saving chunks for level 'My World'/The End
    [20:41:48] [Client thread/WARN]: Unable to play unknown soundEvent: minecraft:gui.button.press
    [20:41:48] [Server thread/INFO]: Stopping server
    [20:41:48] [Server thread/INFO]: Saving players
    [20:41:48] [Server thread/INFO]: Saving worlds
    [20:41:48] [Server thread/INFO]: Saving chunks for level 'My World'/Overworld
    [20:41:48] [Server thread/INFO]: Saving chunks for level 'My World'/Nether
    [20:41:48] [Server thread/INFO]: Saving chunks for level 'My World'/The End
    [20:41:48] [Client thread/WARN]: Unable to play unknown soundEvent: minecraft:music.menu
    [20:41:49] [Client thread/WARN]: Unable to play unknown soundEvent: minecraft:gui.button.press
    [20:41:49] [Client thread/INFO]: Stopping!
    
    SoundSystem shutting down...
        Author: Paul Lamb, www.paulscode.com
    

    I know that Minecraft 1.7 uses a new assets folder structure so I tried a number of things, including copying the sound/sounds folders from the older folder structure as well as creating an assets/virtual/legacy folder with the old assets under there. No change in behaviour though.

    Is there some magic command-line sauce for 1.7.4 that will allow me to start the game with sound?

  • Solved! I was missing a single parameter in my command-line:

    --assetIndex 1.7.4
    

    The launcher does show you most of the command-line it uses to start Minecraft but not all. To see the complete parameter list, you can create a simple batch file as follows:

    @echo off
    echo %*
    

    Save this as, for example, testlaunch.bat.

    Then, in the Minecraft launcher, Edit Profile and set the Java Settings > Executable to this testlaunch.bat file (wherever you put it). Hit the Play button and now the Development Console will show the full command-line, including all the authentication info.

    Don't forget to set the launcher back to its original java executable when you're done.

Tags
minecraft windows
Related questions and answers
  • So, I've found a command among google to run minecraft without using the launcher. I have all the prerequisites, such as all the files from downloading the game. The game will load with using the launcher. However, when I use the following command cd\ set MCDIR=%APPDATA%\.minecraft cd %MCDIR% java -Xmx512M -Djava.library.path="%MCDIR%\versions\1.7.2\1.7.2\1.7.2-natives-205668825357570" -cp...;%MCDIR%\libraries\com\google\guava\guava\15.0\guava-15.0.jar;%MCDIR%\libraries\org\apache\commons\commons-lang3\3.1\commons-lang3-3.1.jar;%MCDIR%\libraries\commons-io\commons-io\2.4\commons-io-2.4.jar

  • downloading C:\Users\Akash\AppData\Roaming\.minecraft\libraries\com\google\guava\guava\14.0\guava-14.0.jar for job 'Version & Libraries': Couldn't connect to server (responded with 403) but have... 'Version & Libraries': Couldn't connect to server (responded with 403) but have local file, assuming it's good Finished downloading C:\Users\Akash\AppData\Roaming\.minecraft\libraries\net\java\jinput...': Couldn't connect to server (responded with 403) but have local file, assuming it's good Finished downloading C:\Users\Akash\AppData\Roaming\.minecraft\libraries\com\google\code\gson\gson\2.2.2

  • \AppData\Roaming\.minecraft\libraries\net\sf\jopt-simple\jopt-simple\4.5\jopt-simple-4.5.jar for job 'Version & Libraries'... (try 0) [16:21:10 INFO]: Attempting to download C:\Users\naw\AppData\Roaming...\twitch\twitch\5.12\twitch-5.12.jar for job 'Version & Libraries'... (try 0) [16:21:10 INFO]: Attempting to download C:\Users\naw\AppData\Roaming\.minecraft\libraries\com\paulscode\libraryjavasound...\guava\guava\15.0\guava-15.0.jar for job 'Version & Libraries'... (try 0) [16:21:10 INFO]: Attempting to download C:\Users\naw\AppData\Roaming\.minecraft\libraries\com\paulscode\librarylwjglopenal

  • (16 threads, 1 files) [21:33:59 INFO]: Finished downloading C:\Users\17millb\AppData\Roaming\.minecraft\libraries\com\google\guava\guava\14.0\guava-14.0.jar for job 'Version & Libraries... checksum, using that [21:33:59 INFO]: Finished downloading C:\Users\17millb\AppData\Roaming\.minecraft\libraries\com\google\code\gson\gson\2.2.2\gson-2.2.2.jar for job 'Version & Libraries... for job 'Version & Libraries': Local file matches local checksum, using that [21:33:59 INFO]: Finished downloading C:\Users\17millb\AppData\Roaming\.minecraft\libraries\net\java\jinput\jinput

  • for level 'world'/Overworld 2014-04-24 13:48:39 [INFO] Saving chunks for level 'world'/Nether 2014-04-24 13:48:39 [INFO] Saving chunks for level 'world'/The End 2014-04-24 13:48:47 [INFO] Starting...] Saving chunks for level 'world'/The End 2014-04-24 14:00:14 [INFO] Stopping server 2014-04-24 14:00:22 [INFO] Starting minecraft server version 1.6.4 2014-04-24 14:00:38 [INFO] Loading properties... 2014-04-24 13:46:27 [INFO] Saving worlds 2014-04-24 13:46:27 [INFO] Saving chunks for level 'world'/Overworld 2014-04-24 13:46:29 [INFO] Starting minecraft server version 1.4.7 2014-04-24 13:46:29 [INFO

  • ://repo.maven.apache.org/maven2/com/google/code/gson/gson/2.2.2/gson-2.2.2.jar Download of gson-2.2.2-sources.jar failed md5 check, deleting Failed to download gson-2.2.2-sources.jar from http://repo.maven.apache.org/maven2/com/google/code/gson/gson/2.2.2/gson-2.2.2-sources.jar Backing up client Backing up server Something failed verifying minecraft files, see log..., deleting Failed to download jopt-simple-4.5.jar from http://repo.maven.apache.org/maven2/net/sf/jopt-simple/jopt-simple/4.5/jopt-simple-4.5.jar Download of jopt-simple-4.5-sources.jar failed md5 check

  • /commons-io/commons-io/2.4/commons-io-2.4.jar for job 'Version & Libraries' [16:02:27 WARN]: Couldn't download libraries.minecraft.net/com/paulscode... to download libraries.minecraft.net/com/google/code/gson/gson/2.2.4/gson-2.2.4.jar for job 'Version & Libraries' [16:02:27 WARN]: Couldn't download libraries.minecraft.net/net...when i start minecraft launcher and click on play to play minecraft 1.7.4 the play button turn to gray and the green bar goes all the way then the play button get back to normal and the games

  • \AppData\Roaming\.minecraft\versions\1.7.4\1.7.4-natives-905029160968 [23:33:48 INFO]: Ignoring visibility rule and showing launcher due to a game crash [23:33:48 WARN]: Couldn't delete C:\Users\Owner...I've attempted to start up Minecraft through my magic launcher a number of times over the past few months and whenever I do I get this message in Dev. Console. [23:33:47 INFO]: Client> [23:33:47...:48 INFO]: Client> # C:\Users\Owner\AppData\Roaming\.minecraft\hs_err_pid5076.log [23:33:48 INFO]: Client> # [23:33:48 INFO]: Client> # If you would like to submit a bug report, please

  • ]: Client> Starting up SoundSystem... [12:12:57 INFO]: Client> Initializing LWJGL OpenAL [12:12:57 INFO]: Client> (The LWJGL binding of OpenAL. For more information, see http://www.lwjgl.org) [12...] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas [12:12:59 INFO]: Client> [12:12:59] [Client thread/INFO]: Created: 256x256 textures/items-atlas** Does anyone know why...Whenever I click "Play" on the launcher it downloads the version and starts to run but it doesn't show anything, I can just hear the main menu music playing and when looking through the console

Data information