1
0
mirror of https://github.com/GeyserMC/Geyser.git synced 2026-01-04 15:31:36 +00:00

Drop any namespace for incoming sounds

Fixes custom sounds defined through a resource pack.
This commit is contained in:
Redned
2023-06-04 22:40:09 -05:00
committed by GitHub
parent 246ebddc78
commit 23cdde5cc6

View File

@@ -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;
}