3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-18 12:30:06 +01:00

SPIGOT-1891: Player.playNote should use RECORDS category

This is what NoteBlock.play etc uses.
Dieser Commit ist enthalten in:
md_5 2017-11-14 09:57:46 +11:00
Ursprung adbfc1f98a
Commit 82f3b02c67

Datei anzeigen

@ -283,7 +283,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
float f = (float) Math.pow(2.0D, (note - 12.0D) / 12.0D); float f = (float) Math.pow(2.0D, (note - 12.0D) / 12.0D);
getHandle().playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(CraftSound.getSoundEffect("block.note." + instrumentName), net.minecraft.server.SoundCategory.MUSIC, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), 3.0f, f)); getHandle().playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(CraftSound.getSoundEffect("block.note." + instrumentName), net.minecraft.server.SoundCategory.RECORDS, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), 3.0f, f));
} }
@Override @Override
@ -324,7 +324,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
break; break;
} }
float f = (float) Math.pow(2.0D, (note.getId() - 12.0D) / 12.0D); float f = (float) Math.pow(2.0D, (note.getId() - 12.0D) / 12.0D);
getHandle().playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(CraftSound.getSoundEffect("block.note." + instrumentName), net.minecraft.server.SoundCategory.MUSIC, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), 3.0f, f)); getHandle().playerConnection.sendPacket(new PacketPlayOutNamedSoundEffect(CraftSound.getSoundEffect("block.note." + instrumentName), net.minecraft.server.SoundCategory.RECORDS, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), 3.0f, f));
} }
@Override @Override