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

Implement level.dat reading and load the seed for use in world generation #402

Merged
merged 6 commits into from
Dec 24, 2024

Conversation

neeleshpoli
Copy link
Contributor

Description

Adds support for reading the level.dat file in the anvil world format. With this support, the seed in the level.dat file is now used for chunk generation.

Testing

Create a world in vanilla minecraft, and load the world into pumpkin. The newly generated chunks should seamlessly blend with the already generated chunks. A sample level.dat was added to unit tests for further testing.

Checklist

Things need to be done before this Pull Request can be merged.

  • Implement level.dat loading
  • Code is well-formatted and adheres to project style guidelines: cargo fmt
  • Code does not produce any clippy warnings: cargo clippy
  • All unit tests pass: cargo test
  • I added new unit tests, so other people don't accidentally break my code by changing other parts of the codebase. How?

@Snowiiii
Copy link
Member

This should be placed not in the chunk dir.

@neeleshpoli
Copy link
Contributor Author

neeleshpoli commented Dec 21, 2024

I placed it in the chunk dir because this is a specific thing to the anvil world format; hence why it's in the anvil file. Do you want me to separate the level.dat loading and chunk loading?

@Snowiiii
Copy link
Member

I would like to separate chunk loading and "general world data loading". It would also make no sense to put it into the chunk folder since it has nothing to do with chunks. Also later someone can may use a different world format while having anvil chunks or the other way around

@neeleshpoli neeleshpoli marked this pull request as draft December 21, 2024 17:45
@neeleshpoli neeleshpoli marked this pull request as ready for review December 22, 2024 01:24
@Snowiiii
Copy link
Member

Looks good now. It so impressive how well everything plays together now. Our generation exactly matches the vanilla. Still have to say great job @kralverde
image
Thanks @neeleshpoli 👍

@Snowiiii Snowiiii merged commit cc83e09 into Pumpkin-MC:master Dec 24, 2024
9 checks passed
@neeleshpoli neeleshpoli deleted the level-dat branch December 29, 2024 17:19
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