sf-inc / music_control

More control over Minecraft musics!
https://modrinth.com/mod/music-control
MIT License
6 stars 6 forks source link

Incompatibility with the Aquamirae mod, crash while trying to start modded biome music #38

Closed DaytonaBlep closed 9 months ago

DaytonaBlep commented 10 months ago

When trying to get into Deep Frozen Ocean, the game freezes and crashes, this does not happen when I turn off Music Control.

Description: Unexpected error

java.lang.NullPointerException: Cannot invoke "net.minecraft.class_2960.equals(Object)" because the return value of "net.minecraft.class_1113.method_4775()" is null
    at net.minecraft.class_1144.ad_astra$modifySound(class_1144.java:629)
    at net.minecraft.class_1144.handler$zcd000$ad_astra$play(class_1144.java:606)
    at net.minecraft.class_1144.method_4873(class_1144.java)
    at net.minecraft.class_1142.handler$geg000$music_control$playMusic(class_1142.java:1112)
    at net.minecraft.class_1142.method_4858(class_1142.java)
    at com.obscuria.aquamirae.AquamiraeClient.playBiomeMusic(AquamiraeClient.java:85)
    at com.obscuria.aquamirae.AquamiraeClient.lambda$onInitializeClient$1(AquamiraeClient.java:38)
    at net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientTickEvents.lambda$static$2(ClientTickEvents.java:43)
    at net.minecraft.class_310.handler$dnh000$fabric-lifecycle-events-v1$onEndTick(class_310.java:21033)
    at net.minecraft.class_310.method_1574(class_310.java:1957)
    at net.minecraft.class_310.method_1523(class_310.java:1181)
    at net.minecraft.class_310.method_1514(class_310.java:802)
    at net.minecraft.client.main.Main.main(Main.java:250)
    at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:468)
    at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
    at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)

I'm attaching a full crash report file: crash-2023-09-15_14.22.02-client.txt

charlyb01 commented 10 months ago

Hello and thank you for the report!
I will check later what's the issue and get back to you when I have the time =)

charlyb01 commented 9 months ago

Hi again! I found the issue causing the crash, I will release a fix very soon. However, this is caused because the music is not registered like others. I will try to understand why to either update my code to detect music or explain the aquamirae mod author if there is a better way to register its music.