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

world scanner crashes in spectrum:deeper_down due to deeper down generating below y=-64 #11

Open
walksanatora opened this issue Mar 12, 2024 · 15 comments
Labels
bug Something isn't working

Comments

@walksanatora
Copy link

the spectrum deeper down generates between y=-64 and y=-320 which causes world scanner assertion to fail

 INFO  region_scanner > Starting to scan dimension: spectrum:deeper_down, at /home/walksanator/.local/share/PrismLauncher/instances/Hextest-1.0.0/.minecraft/saves/New World/dimensions/spectrum/deeper_down/region.
 INFO  region_scanner > World version detected as at least 1.18.
 WARN  region_scanner > Region (-2, -2) failed to load! Error: LoaderError("io error: Error { kind: UnexpectedEof, message: \"failed to fill whole buffer\" }").
 INFO  region_scanner > Processing region (-2, -1).
 INFO  region_scanner > Processing region (0, -2).
 INFO  region_scanner > Processing region (1, 0).
 INFO  region_scanner > Processing region (1, -2).
 INFO  region_scanner > Processing region (-2, 0).
 INFO  region_scanner > Processing region (1, -1).
 INFO  region_scanner > Processing region (-2, 1).
 INFO  region_scanner > Processing region (-1, -2).
 WARN  region_scanner > Region (1, 1) failed to load! Error: LoaderError("io error: Error { kind: UnexpectedEof, message: \"failed to fill whole buffer\" }").
 INFO  region_scanner > Processing region (0, 0).
 INFO  region_scanner > Processing region (0, -1).
 INFO  region_scanner > Processing region (-1, -1).
 INFO  region_scanner > Processing region (0, 1).
 INFO  region_scanner > Processing region (-1, 0).
 INFO  region_scanner > Processing region (-1, 1).
 INFO  region_scanner > Tried to scan 16 regions. Succeeded in scanning 14.
 INFO  region_scanner > Nonempty chunks counted: 6075, around 37.08% of the zone specified.
 INFO  region_scanner > Area on each layer: 1555200
 INFO  region_scanner > Blocks counted: 398131200
 INFO  region_scanner > Elapsed: 18.04s for 16 regions, average of 1.29s per scanned region, or 3.04s per 1024 scanned chunks.
 INFO  region_scanner > Filtered results by normalized frequency. 463 block-dim pairs out of 565 were retained.
The application panicked (crashed).
Message:  assertion failed: *freqs.keys().min().unwrap() >= min_y
Location: src/lib.rs:267
@walksanatora
Copy link
Author

removing assert works but all it does is generate a empty string

@ArticulatedDrunk
Copy link

I'm getting this same crash even with only trying to generate for the overworld

@ArticulatedDrunk
Copy link

 INFO  region_scanner > Starting to scan dimension: minecraft:overworld, at C:\Users\Ozymandias\AppData\Roaming\PrismLauncher\instances\Imagination_integration-V1984\minecraft\saves\a\region.
 INFO  region_scanner > World version detected as at least 1.18.
 INFO  region_scanner > Processing region (1, 0).
 INFO  region_scanner > Processing region (-1, -2).
 INFO  region_scanner > Processing region (-2, -1).
 INFO  region_scanner > Processing region (0, 1).
 INFO  region_scanner > Processing region (-2, -2).
 INFO  region_scanner > Processing region (0, 0).
 INFO  region_scanner > Processing region (1, -1).
 INFO  region_scanner > Processing region (-2, 0).
 INFO  region_scanner > Processing region (0, -1).
 INFO  region_scanner > Processing region (0, -2).
 INFO  region_scanner > Processing region (1, -2).
 INFO  region_scanner > Processing region (1, 1).
 INFO  region_scanner > Processing region (-1, -1).
 INFO  region_scanner > Processing region (-1, 1).
 INFO  region_scanner > Processing region (-2, 1).
 INFO  region_scanner > Processing region (-1, 0).
 INFO  region_scanner > Tried to scan 16 regions. Succeeded in scanning 16.
 INFO  region_scanner > Nonempty chunks counted: 16384, around 100.00% of the zone specified.
 INFO  region_scanner > Area on each layer: 4194304
 INFO  region_scanner > Blocks counted: 1677721600
 INFO  region_scanner > Elapsed: 8.51s for 16 regions, average of 0.53s per scanned region, or 0.53s per 1024 scanned chunks.
 INFO  region_scanner > Filtered results by normalized frequency. 493 block-dim pairs out of 686 were retained.
The application panicked (crashed).
Message:  assertion failed: *freqs.keys().min().unwrap() >= min_y
Location: src\lib.rs:267

@RundownRhino
Copy link
Owner

Hmm, I don't think it would be a good idea to add the export of levels below y=-64 since JER doesn't support it anyway. I didn't realise some mods changed this limit though, I'll change the assertion to a warning that levels below y=-64 will be cut.

@RundownRhino
Copy link
Owner

@ArticulatedDrunk I'm assuming this is modded too, and your overworld extends below y=-64?

@RundownRhino RundownRhino added the bug Something isn't working label Mar 15, 2024
@walksanatora
Copy link
Author

after modifying so I made a patch
patch.diff.txt
(not gonna pr this since it is very opnionated and is overall bad)

but after making a Y-Level override for spectrum deeper down

{
        "spectrum:deeper_down": [-320,-64]
}

the range is now from -256 -> 0
but as I mention in way2muchnoise/JustEnoughResources#468 it is unable to load the generated json.

@walksanatora
Copy link
Author

world-gen.json
which the generated json from my patched version (after filtering for block ids containing ore)

@RundownRhino
Copy link
Owner

RundownRhino commented Mar 15, 2024

Since v0.3.4 RegionScanner will now ignore the blocks below the depth limit instead of panicking. So scanning a dimension like Deeper Down that's entirely below the depth limit just produces no entries. Can't really do much else unless JER starts supporting such worlds, though.
I'd still like to know what can cause the overworld to have the wrong depth, though.

@RundownRhino
Copy link
Owner

after modifying so I made a patch patch.diff.txt (not gonna pr this since it is very opnionated and is overall bad)

A lot of the levels in your world-gen.json are negative, which is likely why JER refuses to load it. If you want to get this to work, you should have your overrides modify offset - so for that dimension, y=-250 should get stored as 70. The idea of the JER format is that all the levels in the world-gen.json file are always nonnegative (and JER, when loading it, will subtract the offset from them). If you do that, JER will probably load the file successfully, and the the plot will just be shifted right by 256 blocks compared to reality.

@walksanatora
Copy link
Author

so instead make a y-offsets json and override the y-offset that way?

@walksanatora
Copy link
Author

lemmy try this

@walksanatora
Copy link
Author

yep that works. aside from the y-values being wrong it works
I may just PR this

@walksanatora
Copy link
Author

patch.diff.txt
heres the diff. makes it so y-override-json takes a json in the format of

{
    "dim": y-offset-override
}

@ArticulatedDrunk
Copy link

@ArticulatedDrunk I'm assuming this is modded too, and your overworld extends below y=-64?

I'm pretty sure it doesn't. We ended up making a file by using the previous release but apparently jer doesn't even support ores on 1.20.1 so it's overall kinda pointless.

@RundownRhino
Copy link
Owner

RundownRhino commented Mar 18, 2024

apparently jer doesn't even support ores on 1.20.1 so it's overall kinda pointless

It does - I've been using JER on 1.20.1 with world-gen.json generated by RegionScanner without issues (though I haven't had any dimensions that go beneath -64).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants