1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-04-16 10:40:54 +02:00

Fix sounds when item frames are modified (MC-123450)

This also fixes the adding sound playing when the item frame direction is changed.
This commit is contained in:
Phoenix616 2019-04-27 20:00:43 +01:00
parent 26c77784e5
commit f5be267fbf

View file

@ -63,7 +63,7 @@
- if (!value.isEmpty()) {
+ this.onItemChanged(itemstack);
+ this.getEntityData().set(ItemFrame.DATA_ITEM, itemstack);
+ if (!itemstack.isEmpty() && playSound) { // CraftBukkit
+ if (!itemstack.isEmpty() && flag && playSound) { // CraftBukkit // Paper - only play sound when update flag is set
this.playSound(this.getAddItemSound(), 1.0F, 1.0F);
}