RundownRhino / RegionScanner

A CLI program to create Just Enough Resources world-gen.json files by scanning Minecraft region files.
GNU General Public License v3.0
22 stars 1 forks source link

Misleading error message when given a zero-sized zone #10

Closed walksanatora closed 7 months ago

walksanatora commented 8 months ago
 INFO  region_scanner > Starting to scan dimension: minecraft:overworld, at /home/walksanator/.local/share/PrismLauncher/instances/Hextest-1.0.0/.minecraft/saves/New World/region.
The application panicked (crashed).
Message:  Was unable to find a single chunk in a single region in the zone provided that was readable!
Location: src/lib.rs:114

Backtrace omitted. Run with RUST_BACKTRACE=1 environment variable to display it.
Run with RUST_BACKTRACE=full to include source snippets.

if I try to download repo and cargo update it still fails after re-compiling

walksanatora commented 8 months ago

I am running with region_scanner --path $PWD/New\ World --dims "minecraft:overworld" --zone -2 -2 2 2 and if I ls New\ World/region I get

r.0.0.mca  r.0.-1.mca  r.0.1.mca  r.0.-2.mca  r.-1.0.mca  r.1.0.mca  r.-1.-1.mca  r.-1.1.mca  r.1.-1.mca  r.1.1.mca  r.-1.-2.mca  r.1.-2.mca  r.2.0.mca  r.2.-1.mca  r.2.1.mca  r.2.-2.mc
RundownRhino commented 7 months ago

Not technically a bug - it can't find any chunks in this zone because your zone specification is zero-sized; the format is <FROM_X> <TO_X> <FROM_Z> <TO_Z>, so you probably want -2 2 -2 2 (which would be 4 by 4 regions). That said, the error message emitted here is indeed quite bad; it should instead refuse to work when given a zero-sized zone.