geforkt von Mirrors/Paper
0ea3083817
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: 1e843b72 #510: Add NamespacedKey#fromString() to fetch from user input a4d18241 #581: Add methods to modify despawn delay for wandering villagers CraftBukkit Changes: 0cd8f19f #802: Add methods to modify despawn delay for wandering villagers d5c5d998 SPIGOT-6362: ConcurrentModificationException: null --> Server Crash 8c7d69fe SPIGOT-5228: Entities that are removed during chunk unloads are not properly removed from the chunk.
34 Zeilen
1.8 KiB
Diff
34 Zeilen
1.8 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Phoenix616 <mail@moep.tv>
|
|
Date: Sat, 27 Apr 2019 20:00:43 +0100
|
|
Subject: [PATCH] Fix sounds when item frames are modified (MC-123450)
|
|
|
|
This also fixes the adding sound playing when the item frame direction is changed.
|
|
|
|
diff --git a/src/main/java/net/minecraft/server/EntityItemFrame.java b/src/main/java/net/minecraft/server/EntityItemFrame.java
|
|
index 2b42906388f8c5b9bb2efeff5ec4d02d19d01f09..8a95e698d5caa3730954ce1135b0ec37a389dd70 100644
|
|
--- a/src/main/java/net/minecraft/server/EntityItemFrame.java
|
|
+++ b/src/main/java/net/minecraft/server/EntityItemFrame.java
|
|
@@ -247,7 +247,7 @@ public class EntityItemFrame extends EntityHanging {
|
|
}
|
|
|
|
this.getDataWatcher().set(EntityItemFrame.ITEM, itemstack);
|
|
- if (!itemstack.isEmpty() && playSound) { // CraftBukkit
|
|
+ if (!itemstack.isEmpty() && flag && playSound) { // CraftBukkit // Paper - only play sound when update flag is set
|
|
this.playSound(SoundEffects.ENTITY_ITEM_FRAME_ADD_ITEM, 1.0F, 1.0F);
|
|
}
|
|
|
|
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
|
|
index 4452204684bc510d84834a7a0e5bbde51d3d262e..65f087828d00404b11211895c6fcb0297d45c1ba 100644
|
|
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
|
|
@@ -50,7 +50,7 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame {
|
|
old.die();
|
|
|
|
EntityItemFrame frame = new EntityItemFrame(world, position, direction);
|
|
- frame.setItem(item);
|
|
+ frame.setItem(item, true, false); // Paper - fix itemframe sound
|
|
world.addEntity(frame);
|
|
this.entity = frame;
|
|
}
|