Note Block Sound Effects

Discussion in 'Plugin Development' started by geekygenius, Sep 14, 2011.

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


    Hey guyz! (like the z?)

    I'm no expert when it comes to packets, and player updates, and other stuff like that. But I was wondering, could you send a note block update to a player without a note-block? This could make some really cool sound effects. I've already though of placing note blocks, then canceling the block update, then playing the note, then removing it, but that seems like too much work. :p Anyway, is it possible?
  2. Offline


    From what I understand, it is possible to play any sound that comes with the standard minecraft.jar at any given location, including note block sounds, without needing to have a "source" (a note block in this case) to create the sound.
  3. Offline


    Well, I looked on the API and found the org.bukkit.util.noise section. Although, I think they only can play tones, not MIDI like notes... which is really odd because I don't expect Minecraft to have that client side ability...
  4. Offline


    When the client receives the packet that tells it to play a note at a coordinate, it first checks if there is a Noteblock there and only then plays the note. That's just how it is and you can't change that (without client mods), so blame notch ;)

    However, you can send a fake noteblock to the player, send the BlockAction packet (to play the noteblock, bukkit has actually API for both) one tick later, and send the original block at the noteblock-location another tick later.

    Depending on how you would use that, you can hide the location of the noteblock in, let's say, the ground so the player won't actually see it.
    geekygenius likes this.
  5. Offline


    DAMN IT NOTCH!!! Well, that's actually a really good idea. I suppose you could use the getTopBlock(), then go one under, check if its not air, then check another under to see if its not air or transparent. I should code a plugin API! ;) Anyway, I consider this "issue" to be resolved, but ill leave it open in case anyone else found a better way. (I don't think this will happen)

    Thanks Bone!
Thread Status:
Not open for further replies.

Share This Page