Spectrum

Spectrum

2M Downloads

[BUG] [1.8.0-alpha3] Invalid biome definitions cause game to crash with Cyanide installed.

murphy-slaw opened this issue ยท 2 comments

commented

Describe the bug
When Cyanide is installed, the game crashes when loading the biomes registry because the music field refers to an invalid soundEvent resource.

This does not cause a crash without Cyanide! Vanilla minecraft ignores the error. I figured you would like to know that the resource is invalid though.

To Reproduce

  • Install spectrum-1.8.0-alpha3 and Cyanide.
  • Create a new world

Expected behavior
A concise description of what you expected to happen.

Minecraft version
1.20.1

Mod version
spectrum-1.8.0-alpha3
cyanide-fabric-1.20.1-4.1.0.

Crash Report
---- Minecraft Crash Report ----
// Don't be sad. I'll do better next time, I promise!

Time: 2024-09-09 22:23:43
Description: mouseClicked event handler

java.lang.IllegalStateException: Error(s) loading registries:

Errors(s) loading registry minecraft:worldgen/biome:

Optional field "music" was invalid: Failed to get element ResourceKey[minecraft:sound_event / spectrum:music.deeper_down_theme]
at: "effects"
at: worldgen/biome 'spectrum:worldgen/biome/black_langast.json'
at: pack 'fabric'
Optional field "music" was invalid: Failed to get element ResourceKey[minecraft:sound_event / spectrum:music.deeper_down_theme]
at: "effects"
at: worldgen/biome 'spectrum:worldgen/biome/crystal_gardens.json'
at: pack 'fabric'
Optional field "music" was invalid: Failed to get element ResourceKey[minecraft:sound_event / spectrum:music.deeper_down_theme]
at: "effects"
at: worldgen/biome 'spectrum:worldgen/biome/deep_barrens.json'
at: pack 'fabric'
Optional field "music" was invalid: Failed to get element ResourceKey[minecraft:sound_event / spectrum:music.deeper_down_theme]
at: "effects"
at: worldgen/biome 'spectrum:worldgen/biome/deep_dripstone_caves.json'
at: pack 'fabric'
Optional field "music" was invalid: Failed to get element ResourceKey[minecraft:sound_event / spectrum:music.deeper_down_theme]
at: "effects"
at: worldgen/biome 'spectrum:worldgen/biome/dragonrot_swamp.json'
at: pack 'fabric'
Optional field "music" was invalid: Failed to get element ResourceKey[minecraft:sound_event / spectrum:music.deeper_down_theme]
at: "effects"
at: worldgen/biome 'spectrum:worldgen/biome/howling_spires.json'
at: pack 'fabric'
Optional field "music" was invalid: Failed to get element ResourceKey[minecraft:sound_event / spectrum:music.deeper_down_theme]
at: "effects"
at: worldgen/biome 'spectrum:worldgen/biome/noxshroom_forest.json'
at: pack 'fabric'
Optional field "music" was invalid: Failed to get element ResourceKey[minecraft:sound_event / spectrum:music.deeper_down_theme]
at: "effects"
at: worldgen/biome 'spectrum:worldgen/biome/razor_edge.json'
at: pack 'fabric'

at com.alcatrazescapee.cyanide.codec.MixinHooks.loadAllRegistryData(MixinHooks.java:135)
at net.minecraft.class_7655.handler$bhf000$cyanide$loadAndReportErrors(class_7655.java:519)
at net.minecraft.class_7655.method_45121(class_7655.java)
at net.minecraft.class_7237.method_45142(class_7237.java:67)
at net.minecraft.class_7237.method_45143(class_7237.java:71)
at net.minecraft.class_7237.method_42098(class_7237.java:34)
at net.minecraft.class_525.method_31130(class_525.java:333)
at net.minecraft.class_526.method_19944(class_526.java:60)
at net.minecraft.class_4185.method_25306(class_4185.java:94)
at net.minecraft.class_4264.method_25348(class_4264.java:56)
at net.minecraft.class_339.method_25402(class_339.java:189)
at net.minecraft.class_4069.method_25402(class_4069.java:38)
at net.minecraft.class_312.method_1611(class_312.java:98)
at net.minecraft.class_437.method_25412(class_437.java:409)
at net.minecraft.class_312.method_1601(class_312.java:98)
at net.minecraft.class_312.method_22686(class_312.java:169)
at net.minecraft.class_1255.execute(class_1255.java:102)
at net.minecraft.class_312.method_22684(class_312.java:169)
at org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:43)
at org.lwjgl.system.JNI.invokeV(Native Method)
at org.lwjgl.glfw.GLFW.glfwWaitEventsTimeout(GLFW.java:3474)
at com.mojang.blaze3d.systems.RenderSystem.limitDisplayFPS(RenderSystem.java:237)
at net.minecraft.class_310.method_1523(class_310.java:1244)
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:470)
at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:100)
at org.prismlauncher.EntryPoint.listen(EntryPoint.java:129)
at org.prismlauncher.EntryPoint.main(EntryPoint.java:70)
commented

This is odd. I figured this would be an easy fix- sounds.json defines the dim theme as spectrum:music.deeper_down, whereas the biome jsons refer to spectrum:music.deeper_down_theme. Except, for some reason, the music works like this, and removing the _theme breaks it. Either there's some mojank at play here or I'm just misunderstanding something.

commented

Ok, so as it turns out the music works no matter what those jsons contain, because there's a mixin that overwrites the music anyway. Without the mixin, no matter what the jsons contain, overworld music plays. That seems bad, but for now I've updated the jsons so this crash won't happen anymore.