Broken "Note" API

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Minor
    • None
    • Affects Version/s: None
    • None

      When using the Player.playNote(Location loc, Instrument instrument, Note note) and Player.playNote(Location loc, byte instrument, byte note) the sound output is garbage. I managed to trace down the problem to:
      {{
      public class CraftPlayer extends CraftHumanEntity implements Player
      {
      ...
      public void playNote(Location loc, byte instrument, byte note)

      { ... getHandle().playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect("note." + instrumentName, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), 3.0F, note)); // <-- bug in here }

      ...
      public void playNote(Location loc, Instrument instrument, Note note)

      { ... getHandle().playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect("note." + instrumentName, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), 3.0F, note.getId())); // <-- bug in here }

      }}

            Assignee:
            Thinkofname
            Reporter:
            SB_Prime
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: