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

Anvil Saving #168

Draft
wants to merge 13 commits into
base: master
Choose a base branch
from
Draft

Anvil Saving #168

wants to merge 13 commits into from

Conversation

lukas0008
Copy link
Collaborator

This pr aims to add world saving using minecraft .mca files to pumpkin.

@lukas0008
Copy link
Collaborator Author

Comment: d0b6805 added the ability to save chunks to anvil, but converting chunks into bytes is still not done.

Comment on lines 90 to 145
fn modulus(a: i32, b: i32) -> i32 {
((a % b) + b) % b
}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You never can have enough of modulus functions right 😉

Comment on lines 182 to 243
let region = (
((at.x as f32) / 32.0).floor() as i32,
((at.z as f32) / 32.0).floor() as i32,
);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use this also for reading, would probably make sense to have it as a function

@Snowiiii
Copy link
Owner

I also noticed that there is no compression yet

@lukas0008 lukas0008 force-pushed the world-saving branch 3 times, most recently from 872dc7e to bd357b0 Compare October 24, 2024 18:27
lukas0008 and others added 9 commits October 24, 2024 20:27
`BlockString` is yet another representation of `BlockId`/`BlockState`, but this time it is a string representation.
- Actually write the location table correctly
- Stop using windows exclusive .seek_read/write functions
@Bryntet
Copy link
Contributor

Bryntet commented Oct 29, 2024

Yooo good job @Snowiiii :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants