Sunday, June 5, 2011

r747 - Sound and Music Changes

An update with lots of little things in regards to sound and music.

  • Music stops when quiting a map
  • Music Blocks can stop music now
  • Message blocks when they have an empty string won't add a line to the chat window now
  • Fixes a crash when converting old maps due to the trigger manager hasn't been created yet
  • Can now play sound and music with the "sound" module in javascripts
    • sound.playSoundUI(soundName) - Plays a normal 2d sound
    • sound.playSoundUI(soundName, volume, pitch) - Plays a 2d sound with a set volume and pitch change
    • sound.playSound3D(soundName, x, y, z) - Plays a sound at the specified 3d position
    • sound.playSound3D(soundName, x, y, z, volume, pitch) - Plays a sound at the specified 3d position, volume, and pitch change.
    • sound.playMusic(musicName) - Plays the specified music
    • sound.playMusic(musicName, fadeOut, fadeIn) - Plays the specified music, with fading out the current playing music over x ms and fades in the new music over y ms.
    • sound.stopMusic() - Stops the current music


  1. Wow, we were talking about all these things in the IRC just yesterday and the day before. :D
    Thanks Cryect.

  2. --- BEGIN ERROR REPORT ce00d74f --------
    Generated 6/06/11 17:13

    AdventureCraft r755: Minecraft Beta 1.6.6
    OS: Windows 7 (x86) version 6.1
    Java: 1.6.0_24, Sun Microsystems Inc.
    VM: Java HotSpot(TM) Client VM (mixed mode), Sun Microsystems Inc.
    LWJGL: 2.4.2
    OpenGL: ATI Radeon HD 4870 version 3.3.10600 Compatibility Profile Context, ATI Technologies Inc.

    java.lang.ArrayIndexOutOfBoundsException: 1
    at GuiMusic.a(
    at cy.a(
    at cy.f(
    at cy.e(
    at net.minecraft.client.Minecraft.k(
    at Source)
    --- END ERROR REPORT ce17b254 ----------

    Why ? :O