From 23cdde5cc60e3275b8eb77bf5f9ec30c753a13e1 Mon Sep 17 00:00:00 2001 From: Redned Date: Sun, 4 Jun 2023 22:40:09 -0500 Subject: [PATCH] Drop any namespace for incoming sounds Fixes custom sounds defined through a resource pack. --- core/src/main/java/org/geysermc/geyser/util/SoundUtils.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/src/main/java/org/geysermc/geyser/util/SoundUtils.java b/core/src/main/java/org/geysermc/geyser/util/SoundUtils.java index 44b905209..3e6026313 100644 --- a/core/src/main/java/org/geysermc/geyser/util/SoundUtils.java +++ b/core/src/main/java/org/geysermc/geyser/util/SoundUtils.java @@ -78,9 +78,9 @@ public final class SoundUtils { } private static String trim(String identifier) { - // Drop the Minecraft namespace if applicable - if (identifier.startsWith("minecraft:")) { - return identifier.substring("minecraft:".length()); + // Drop any namespace if applicable + if (identifier.contains(":") { + return identifier.split(":")[1]; } return identifier; }