Skip to content

scratch worlds from a seed, so a run does not depend on a hand-made save #16

Description

@Flatts3000

The problem

Verification currently depends on a hand-made world that has to exist, be named correctly, and be in
the right state. --world "New World" assumes somebody made it. A world that drifts (blocks placed
during a previous run, time of day, a wandering mob) makes two runs differ for reasons unrelated to
the change under test.

The proposal

Create a scratch world on demand from a fixed seed, and throw it away afterwards:

gamebridge launch --instance "$INSTANCE" --port "$PORT" --new-world --seed 12345 --scratch

--scratch deletes the save on exit, so a run leaves nothing behind and the next one starts
identical.

Where this belongs

Probably the launcher rather than the mod, since world creation is a launch concern and the game is
not running yet. Vanilla has --quickPlaySingleplayer for an existing world but no "create one";
that may mean writing a level.dat before launch, which is a real piece of work and needs care.

Notes

  • The alternative is a template world copied into place before launch, which is cruder and probably
    works today with no code at all. Worth trying that first and seeing whether it is enough.
  • Interacts with the freeze issue: a fixed seed plus frozen weather and time is most of what
    reproducible screenshots need.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions