diff --git a/gradle.properties b/gradle.properties index af129da..b40f00c 100644 --- a/gradle.properties +++ b/gradle.properties @@ -8,7 +8,7 @@ minecraft_version=1.21.1 loader_version=0.16.9 # Mod Properties -mod_version=3.0.0 +mod_version=4.0.0 maven_group=symbolics.division.meret archives_base_name=meret diff --git a/src/client/java/symbolics/division/meret/mixin/client/MinecraftMixin.java b/src/client/java/symbolics/division/meret/mixin/client/MinecraftMixin.java index ccfce3e..0a53518 100644 --- a/src/client/java/symbolics/division/meret/mixin/client/MinecraftMixin.java +++ b/src/client/java/symbolics/division/meret/mixin/client/MinecraftMixin.java @@ -2,7 +2,9 @@ import net.minecraft.client.Minecraft; import net.minecraft.client.player.LocalPlayer; +import net.minecraft.core.Holder; import net.minecraft.sounds.Music; +import net.minecraft.sounds.SoundEvents; import org.spongepowered.asm.mixin.Mixin; import org.spongepowered.asm.mixin.Shadow; import org.spongepowered.asm.mixin.injection.At; @@ -21,8 +23,12 @@ public class MinecraftMixin { ) public void modifyGetSituationalMusic(CallbackInfoReturnable ci) { Music override = MeretClient.getOverride(this.player); - if (override == null) return; - ci.setReturnValue(override); + if (override == null) { + // override vanilla music always + ci.setReturnValue(new Music(Holder.direct(SoundEvents.EMPTY), 10, 10, false)); + } else { + ci.setReturnValue(override); + } ci.cancel(); } }