Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to load due to SparseStructuresConfig.customSpreadFactors() #10

Open
PapiOphidian opened this issue Nov 27, 2023 · 4 comments
Open
Labels
bug Something isn't working next Feature/bug patch that will be added for next release

Comments

@PapiOphidian
Copy link

PapiOphidian commented Nov 27, 2023

When attempting to load a dedicated server with sparsestructures 2.1 (1.20.2), every structure fails to load because the return value of SparseStructuresConfig.customSpreadFactors() is null

I hacked an if null, return an empty new class that impl List else return this.customSpreadFactors and that seems to load things fine. Untested if it actually makes a difference however.

Stack trace snippet (repeat for every structure vanilla and modded):

> Errors in registry minecraft:worldgen/structure_set:
>> Errors in element minecraft:ancient_cities:
java.lang.IllegalStateException: Failed to parse minecraft:worldgen/structure_set/ancient_cities.json from pack vanilla
        at net.minecraft.class_7655.method_45122(class_7655.java:179)
        at net.minecraft.class_7655$class_7657.method_45132(class_7655.java:61)
        at net.minecraft.class_7655.method_45120(class_7655.java:98)
        at java.base/java.lang.Iterable.forEach(Iterable.java:75)
        at net.minecraft.class_7655.method_45121(class_7655.java:98)
        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.server.Main.method_43612(Main.java:159)
        at net.minecraft.class_156.method_43498(class_156.java:945)
        at net.minecraft.class_156.method_43499(class_156.java:939)
        at net.minecraft.server.Main.main(Main.java:157)
        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.KnotServer.main(KnotServer.java:23)
        at net.fabricmc.loader.impl.launch.server.FabricServerLauncher.main(FabricServerLauncher.java:69)
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.List.stream()" because the return value of "io.github.maxencedc.sparsestructures.SparseStructuresConfig.customSpreadFactors()" is null
        at net.minecraft.class_7655.handler$dok000$sparsestructures$load(class_7655.java:1028)
        at net.minecraft.class_7655.method_45122(class_7655.java:175)
        ... 15 more
@MaxenceDC MaxenceDC added bug Something isn't working next Feature/bug patch that will be added for next release labels Nov 28, 2023
@MaxenceDC
Copy link
Owner

This seems like a bad issue, thank you for the report! I will try to reproduce and fix it asap.

@PapiOphidian
Copy link
Author

I tried to load the server with my hack and it didn't load, but there were no errors. Granted, there were other mods that messed with world gen, so that may be it but idk.

@MaxenceDC
Copy link
Owner

Sorry for the late reply, do you happen to have a list of the worldgen mods you were using?

@PapiOphidian
Copy link
Author

blossom blade
c2me
dungeons and taverns
dungeons arise
explorify
incendium
nullscape
repurposed structures
sky villages
snow under trees
starlight
structory + towers
terralith

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working next Feature/bug patch that will be added for next release
Projects
None yet
Development

No branches or pull requests

2 participants