Skip to content

World validation tool#18

Merged
ReCore-sys merged 4 commits intomasterfrom
feature/world-validation
Mar 9, 2026
Merged

World validation tool#18
ReCore-sys merged 4 commits intomasterfrom
feature/world-validation

Conversation

@ReCore-sys
Copy link
Copy Markdown
Contributor

This PR adds a tool to check that the world is valid. Run with temper.exe validate

Description

It primarily checks that the chunks and players are all decodable and match their struct definition, along with decompression checksums for chunks. It does this by iterating all chunks and players stored, then trying to decompress and decode them one by one. Larger worlds will take longer to validate, especially as the number of checks increases. Speaking of which, new checks should be added as new features are added (ie, validating inventories don't contain invalid items, entities don't share UUIDs, etc.)

Motivation and Context

Having a way to check if the world is valid from the command line would be very valuable for automated servers that need to know if the world is invalid as opposed to another type of crash.

How has this been tested?

World format has been changed and checked if the validation fails or not

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Refactor (restructuring code, without changing its behavior)

Checklist:

  • My code follows the code style of this project.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • Clippy passes with no warnings.

@ReCore-sys ReCore-sys added the enhancement New feature or request label Mar 9, 2026
@ReCore-sys ReCore-sys merged commit c85ac9b into master Mar 9, 2026
6 checks passed
@ReCore-sys ReCore-sys deleted the feature/world-validation branch March 9, 2026 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant