Snugs / SpawnStructures_Forge

Adds a starter structure to new Minecraft worlds, with a variety of QOL features.
https://www.curseforge.com/minecraft/mc-mods/spawn-structures
2 stars 0 forks source link

[1.0.6] java.lang.NullPointerException: Rendering overlay #2

Closed jburrows82 closed 9 months ago

jburrows82 commented 9 months ago

NPE right before Main Menu on 1.0.6, version 1.0.5 loads fine.

https://mclo.gs/BPPLtID (crashlog)

https://mclo.gs/54seXnD (latest)

https://mclo.gs/J9ZxyxC (debug)

Snugs commented 9 months ago

My apologies but I'm struggling to see in the crash logs where this mod affected the crash... At present, this mod doesn't affect the renderer, or render overlays, which is where the NPE appears to be coming from. Have you updated any other mods in your installation recently?

jburrows82 commented 9 months ago

I know it's a very odd NPE, but I actually singled it down to your mod (as in only switching version of Spawn Structures). Version 1.0.5 works fine, if I use 1.0.6 I get the NPE. I was hoping maybe it was a problematic Mixin or something you use, but I don't know what really changed between .5 and .6?

Snugs commented 9 months ago

1.0.6 was the first version I released without checking prior that my own mod pack would also upgrade to the new version without any issues... a lesson learned on my behalf. I wasn't able to replicate the issue that you've been having, however, I did discover that the config file in my pack didn't upgrade from the 1.0.5 version to the 1.0.6 version, and caused issues accordingly. Would you mind checking that your "Spawn Structures - Common.toml" file is somewhat representative of the following content, and if not, updating it and trying to load it again? I did notice your latest log mentioned that the config file was not correct. This is the default 1.0.6 config contents:

#---------------------------------#
["Starter Structure Spawn Location"]
    # Should the Starter Structure spawn at a specific location?
    "Set World Spawn" = true
    # Which specific location should the Starter Structure generate at? [x,z]
    "Specify World Spawn Location" = "[0,0]"
    # Should the Starter Structure spawn in a specific biome? (Takes priority over "Set World Spawn" if not set to "ANY")
    # Example 1: "MINECRAFT:CHERRY_GROVE" will search specifically for the Cherry Grove biome.
    # Example 2: "TAIGA" will search for ANY Taiga biome, including the Snowy Taiga and Old Growth Taiga biomes.
    "Set Spawn Biome" = "ANY"

#--------------------#
["GameRule Overrides"]
    # Should the Starter Structure spawn even if Generate Structures is set to false?
    "Ignore GameRule: Generate Structures" = true
    # Should the Spawn Radius set in the World Options be ignored?
    "Ignore GameRule: Spawn Radius" = true
    # How big should the new Spawn Radius be? (Only applies if "Ignore GameRule: Spawn Radius" is true)
    #Range: 0 ~ 4
    "Spawn Radius" = 0
    # Which direction should the player spawn facing? ("STRUCTURE_LOCKED" usually means facing the Spawn Structure's door)
    # Values: "STRUCTURE_LOCKED", "RANDOMIZED", "NORTH", "EAST", "SOUTH", "WEST"
    "Spawn Orientation" = "STRUCTURE_LOCKED"
jburrows82 commented 9 months ago

I had noticed those config spec errors myself, so I tried previously regenerating the config with 1.0.6, but I still got the NPE (with no spec errors). However I just pasted the default you replied with and no NPE at launch. I double checked by deleting the config to re-generate and indeed it's the incorrect format and NPE.

Correct config spec is the solution. Thank you for suggesting that because I wouldn't have tried that after re-generating didn't work. I love your mod, it's EXACTLY what I was looking for in my pack and I can't wait to see all the new features you have in the pipeline!

Snugs commented 9 months ago

I have found the root cause of the issue... something regarding pushing the player spawning angle to the config file was causing the config file to not generate correctly, even when generating a fresh config file, and subsequently threw the Null Pointer Exception. This issue likely affects everyone using the 1.0.6 beta version, so thank you for bringing it up to me! It will be fixed with the next release ^_^