Skip to content

refactor(stash-finder): modernize file IO and CSV handling - #6607

Merged
Big-Iron-Cheems merged 5 commits into
MeteorDevelopment:masterfrom
Big-Iron-Cheems:feat/stash-finder
Aug 27, 2026
Merged

refactor(stash-finder): modernize file IO and CSV handling#6607
Big-Iron-Cheems merged 5 commits into
MeteorDevelopment:masterfrom
Big-Iron-Cheems:feat/stash-finder

Conversation

@Big-Iron-Cheems

Copy link
Copy Markdown
Collaborator

Type of change

  • Bug fix
  • New feature

Description

Refactors StashFinder file I/O and chunk coordinate handling.

The changes modernize the CSV serialization/deserialization by defining CSV fields with explicit getters and setters,
while keeping CSV coordinates stored as chunk coordinates, matching the existing JSON representation and preserving the previous coordinate format.

Chunk world coordinates are no longer stored as redundant/transient fields.
They are derived directly from ChunkPos using Minecraft's ChunkPos helpers, ensuring there is a single source of truth for chunk position and avoiding duplicated coordinate state.

ChunkPos is also treated as effectively immutable within Chunk, reflecting that the chunk position is assigned when the stash is created and is not subsequently replaced.

Related issues

None.

How Has This Been Tested?

Tested by loading and saving existing StashFinder JSON/CSV data and verifying that:

  • Chunk coordinates are preserved in their existing format.
  • CSV and JSON continue to represent the same chunk positions.
  • World-space coordinates are correctly derived from ChunkPos.
  • Stash coordinates displayed in the UI and notifications remain correct.
  • Goto and tracer functionality continue to target the center of the recorded chunk.
  • Existing stash entries load correctly after the coordinate refactor.

Checklist:

  • My code follows the style guidelines of this project.
  • I have added comments to my code in more complex areas.
  • I have tested the code in both development and production environments.

This also fixes mismatches in CSV field read/writes.
Mistakenly switched to world coords.
No need to store transient x/z coords and recalculate the values on load.
Only the counters are to be mutated at any time.
@Big-Iron-Cheems
Big-Iron-Cheems merged commit 7d40c29 into MeteorDevelopment:master Aug 27, 2026
1 check passed
@Big-Iron-Cheems
Big-Iron-Cheems deleted the feat/stash-finder branch August 27, 2026 18:22
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