barneygale / quarry

Python library that implements the Minecraft network protocol and data types
Other
532 stars 74 forks source link

World Generation and Loading #95

Closed biodag closed 3 years ago

biodag commented 4 years ago

I've got a barebones server running. It loads in, supports chat and a playerlist, and floats the player at 0, 75, 0. How would I load in a pre-generated world or generate one from scratch?

barneygale commented 3 years ago

You can load a pre-generated world using RegionFile and BlockArray - see this example in the docs.. You can send chunks to a player with a chunk_data packet. Knowing which chunks to send is pretty fiddly, I'd suggest using a proxy (which you can build with quarry!) to check what the official server behaviour is.

As for world generation, that's a bit outside the scope of this project :-). A good start would be some multi-layered perlin noise.