owengage / fastnbt

Fast serde serializer and deserializer for Minecraft's NBT and Anvil formats
MIT License
185 stars 34 forks source link

[Feature Request] Add a simple get_block(x, y, z) API #17

Open Badel2 opened 3 years ago

Badel2 commented 3 years ago

As a user of fastanvil, I find myself converting between block coords, chunk coords and region coords fairly often. To avoid any mistakes that could happen because of this conversions, I think it would be a good idea to provide an API that abstracts away the region and chunk logic.

Here I made a proof of concept, but I'm not happy with it:

https://github.com/Badel2/slime_seed_finder/blob/196b4a8bf6923432c8bdf7904af0e1ed034bd987/src/fastanvil_ext.rs

owengage commented 3 years ago

Hi, I like this idea. Some abstraction on the level on dimension would be very useful.