From dc684c60d16f66ea84467ec8e253f2a36a17a7c8 Mon Sep 17 00:00:00 2001 From: Nassim Jahnke Date: Sun, 16 Jun 2024 12:56:00 +0200 Subject: Remove bad server.scheduleOnMain disconnect calls from old patches The new behavior of disconnect to block the current thread until the disconnect succeeded is better than throwing it off to happen at some point --- ...ot-sound-playing-for-BlockItem-ItemStacks.patch | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 patches/server/0827-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch (limited to 'patches/server/0827-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch') diff --git a/patches/server/0827-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch b/patches/server/0827-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch new file mode 100644 index 0000000000..ba85bd867f --- /dev/null +++ b/patches/server/0827-Fix-spigot-sound-playing-for-BlockItem-ItemStacks.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Owen1212055 <23108066+Owen1212055@users.noreply.github.com> +Date: Thu, 8 Jun 2023 20:23:13 -0400 +Subject: [PATCH] Fix spigot sound playing for BlockItem ItemStacks + + +diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java +index 96a7e80e3efab1bf626fb7aff61e095ca09789d4..f0b166a7fbeb222b97b5f2770c20d98df5d9bcc8 100644 +--- a/src/main/java/net/minecraft/world/item/ItemStack.java ++++ b/src/main/java/net/minecraft/world/item/ItemStack.java +@@ -571,7 +571,11 @@ public final class ItemStack implements DataComponentHolder { + + // SPIGOT-1288 - play sound stripped from ItemBlock + if (this.item instanceof BlockItem) { +- SoundType soundeffecttype = ((BlockItem) this.item).getBlock().defaultBlockState().getSoundType(); // TODO: not strictly correct, however currently only affects decorated pots ++ // Paper start - Fix spigot sound playing for BlockItem ItemStacks ++ BlockPos position = new net.minecraft.world.item.context.BlockPlaceContext(context).getClickedPos(); ++ net.minecraft.world.level.block.state.BlockState blockData = world.getBlockState(position); ++ SoundType soundeffecttype = blockData.getSoundType(); ++ // Paper end - Fix spigot sound playing for BlockItem ItemStacks + world.playSound(entityhuman, blockposition, soundeffecttype.getPlaceSound(), SoundSource.BLOCKS, (soundeffecttype.getVolume() + 1.0F) / 2.0F, soundeffecttype.getPitch() * 0.8F); + } + -- cgit v1.2.3