Skip to content

Conversation

@scd31
Copy link

@scd31 scd31 commented Sep 7, 2025

[Note: please merge my other PRs before this one!]

Adds a JSON file with world metadata. Right now I'm just saving the world coords (MC and Geo) but I can envision more stuff being added in the future.

I threw this together as a PoC: https://arnis-map.scd31.com/ allows you to click on a part of the map (once you load the metadata.json file) and get the MC coords, plus the command to teleport there. I could also see this being used by e.g. server plugins. Eventually I want to write one that let's you do e.g. /geotp "24 sussex drive" and it uses the metadata to know where to teleport you.

@louis-e
Copy link
Owner

louis-e commented Sep 13, 2025

retrigger-benchmark

@github-actions
Copy link

⏱️ Benchmark run finished in 2m 13s
🧠 Peak memory usage: 5874 MB (↗ 0% more)

📈 Compared against baseline: 135s
🧮 Delta: -2s
🔢 Commit: 4f9f4f1

🟢 Generation time is unchanged.

You can retrigger the benchmark by commenting retrigger-benchmark.

@louis-e
Copy link
Owner

louis-e commented Sep 13, 2025

LGTM
I will just improve the error handling in the metadata creation step by replacing .expect() with a more greaceful handling which otherwise would panic the program on failure, since the metadata saving isn't a crucial part of the generation pipeline. Let me know if you don't agree with that!

@louis-e louis-e merged commit e5a82ba into louis-e:main Sep 13, 2025
2 checks passed
@scd31
Copy link
Author

scd31 commented Sep 13, 2025

LGTM I will just improve the error handling in the metadata creation step by replacing .expect() with a more greaceful handling which otherwise would panic the program on failure, since the metadata saving isn't a crucial part of the generation pipeline. Let me know if you don't agree with that!

This probably isn't worth bike-shedding on two much, but my thinking is basically that it should be exceedingly rare for this step to fail but the other file saving steps (regions etc.) to succeed. Furthermore it may be confusing or frustrating for users if this step happens to fail and then, months down the line, they then need this file (like for one of the many arnis utilities that I expect to show up over time (: ). In that case it may be better to fail early, even if it requires them to regenerate their world

Like I said though, this isn't a huge deal either way and I don't feel strongly, just explaining my initial logic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants