Solved Is it possible?

Discussion in 'Plugin Development' started by PePsiGam3r, Sep 4, 2014.

Thread Status:
Not open for further replies.
  1. Offline

    PePsiGam3r

    Hey Bukkit, is it possible to play a numbered sound?
    like: explode1, explode4
     
  2. Offline

    ColonelHedgehog

    "Numbered sound?"
    There's the playSound method, if that's what you mean.

    You can either use it as World.playSound (plays to everyone in immediate area) or Player.playSound (plays only to player). Parameters are (Location, Sound [enum], float [volume], float [pitch]).
     
  3. Offline

    PePsiGam3r

    ColonelHedgehog Nope, I meant when you play a sound like Explode Sound, it run itself randomly from numbered sounds, you'll understand what I mean if you went to %appdata% > .minecraft > resources > step, as you can see there's 4 files, first is gravel1, second is gravel2, third is gravel3 and fourth is gravel4, but playSound method does not support this feature, if you typed SOUND.STEP_GRAVEL it choose sometimes (gravel1) and sometimes (gravel2) and .....etc
     
  4. Offline

    JBoss925

    NMS. You give a path to the sound. Not sure how to do it for sure though.
     
  5. Offline

    PePsiGam3r

    JBoss925 Oh, I don't know how to do it too, but you gave me one more idea, thanks for helping anyways.

    -Any more idea(s)?
     
  6. Offline

    nzkiwi.5000

    Try sending a packet. I have never messed around with them, but i think this could be the only way now.
     
  7. Offline

    Techy4198

    Not possible. The server always sends the same thing, the client does the random choosing, based off the sounds.json file.
     
  8. Offline

    PePsiGam3r

    nzkiwi.5000 Okay thanks, I will try.

    Techy4198 Oh, so bad thing... is it a client-side?

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 10, 2016
  9. Offline

    Techy4198

    PePsiGam3r Yes. So unless the player uses a specially designed resource pack with a custom sounds.json file, there isn't a way to do it.
     
  10. Offline

    PePsiGam3r

    Techy4198 Oh, thanks for the help dude :)
    *SOLVED*
     
Thread Status:
Not open for further replies.

Share This Page