From 8226a3b03a89738a7039f1cefdbdfcb89011984e Mon Sep 17 00:00:00 2001 From: Taahh Date: Sat, 26 Aug 2023 06:38:40 -0700 Subject: [PATCH] Update slime branch (#142) * Update Paper * Add length limit to note block sound (#141) Reported by @NekosAreKawaii --------- Co-authored-by: Telesphoreo Co-authored-by: allinkdev <44676012+allinkdev@users.noreply.github.com> --- ...Add-length-limit-to-note-block-sound.patch | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 patches/server/0054-Add-length-limit-to-note-block-sound.patch diff --git a/patches/server/0054-Add-length-limit-to-note-block-sound.patch b/patches/server/0054-Add-length-limit-to-note-block-sound.patch new file mode 100644 index 0000000..46c6329 --- /dev/null +++ b/patches/server/0054-Add-length-limit-to-note-block-sound.patch @@ -0,0 +1,19 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Allink +Date: Fri, 25 Aug 2023 11:51:47 +0100 +Subject: [PATCH] Add length limit to note block sound + + +diff --git a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java +index a2fc2c0437999dd09f080eafe8ea466b16cdf57b..0dcf1d7e041477fe31dce4b4ee707399520d30f2 100644 +--- a/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java ++++ b/src/main/java/net/minecraft/world/level/block/entity/SkullBlockEntity.java +@@ -80,7 +80,7 @@ public class SkullBlockEntity extends BlockEntity { + } + + if (nbt.contains("note_block_sound", 8)) { +- this.noteBlockSound = ResourceLocation.tryParse(nbt.getString("note_block_sound")); ++ this.noteBlockSound = ResourceLocation.tryParse(StringUtil.truncateStringIfNecessary(nbt.getString("note_block_sound"), 32767, false)); // Scissors - Add length limit to note block sound + } + + }