From 6d0042e4f3030f3a942c1d19b58d8a1cb3ff5459 Mon Sep 17 00:00:00 2001 From: Goldorion <38427877+Goldorion@users.noreply.github.com> Date: Tue, 20 Jun 2023 23:21:06 -0400 Subject: [PATCH] Custom sounds failed to build (Fix #422) --- changelog.md | 3 ++- src/fabric-1.20.1/templates/elementinits/sounds.java.ftl | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/changelog.md b/changelog.md index 8fb38950..cb77db15 100644 --- a/changelog.md +++ b/changelog.md @@ -1,7 +1,8 @@ # Changelogs: ## 1.9.3 -* [Bugfix #423] The world dependency failed to compile in some cases +* [Bugfix #422] Custom sounds failed to build +* [Bugfix #424] The world dependency failed to compile in some cases ## 1.9.2 * Updated Fabric API to 0.83.1, so it always works diff --git a/src/fabric-1.20.1/templates/elementinits/sounds.java.ftl b/src/fabric-1.20.1/templates/elementinits/sounds.java.ftl index b56de5f8..9badd08e 100644 --- a/src/fabric-1.20.1/templates/elementinits/sounds.java.ftl +++ b/src/fabric-1.20.1/templates/elementinits/sounds.java.ftl @@ -29,7 +29,7 @@ package ${package}.init; public class ${JavaModName}Sounds { <#list sounds as sound> - public static SoundEvent ${sound?upper_case} = new SoundEvent(new ResourceLocation("${modid}", "${sound}")); + public static SoundEvent ${sound?upper_case} = SoundEvent.createVariableRangeEvent(new ResourceLocation("${modid}", "${sound}")); public static void load() {