Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Database importing #112

Merged
merged 28 commits into from
Nov 2, 2024
Merged

Database importing #112

merged 28 commits into from
Nov 2, 2024

Conversation

ReCore-sys
Copy link
Collaborator

@ReCore-sys ReCore-sys commented Nov 2, 2024

This PR adds the functionality necessary for importing chunks into the database

Description

Using the anvil parser added in #100 this PR adds functionality for reading chunks from anvil files and storing them in the database. It also adds methods for storing, loading and deleting chunks. Additionally it also adds the ability to serialize chunk data into an in-memory struct, using the NBT parser added in #53. GZIP and Redb have been selected as the default compression scheme and database backend.
This PR also changes the format of the config system, so not pulling the changes will result in merge conflicts or compilation issues.
The database functionality is in no way complete, but should suffice for now to allow for chunk sending.

Motivation and Context

Chunk importing is vital for any kind of interactivity without chunk generation implemented.
Issue: #95

How has this been tested?

This has been tested multiple times manually but would be very difficult to create unit tests for and would not play nicely with CI so they have not been included. Tests for data validity have not been included since it would be impossible to test without chunk sending (#70) implemented.

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.

@Sweattypalms Sweattypalms merged commit aa19a09 into rewrite/v3 Nov 2, 2024
3 checks passed
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