Open macfreek opened 12 years ago
Chunk is minecraft specific. This should be included as a function that can be callled when the block is finalized
I propose to make the functions that update the heightmap and lightlevel (#24) callback functions. Chunk is mostly a wrapper to simplify access to the NBT data structure. However, these functions add more logic and need additional information. In this case about light emission from certain blocks.
By making them callback functions instead of methods in Chunk, it is easier to update them with a more sophisticated method later (e.g. taking into account if a light switch is on or off), or have tools that rely on the NBT library override them. I'll make a proposal.
nbt.chunk is capable of settings blocks, but does not update the light levels in the nbt file as well.
Edit: I consider this a small issue, and perhaps it should not be implemented by the NBT library, as it is very Minecraft specific, and applications that use NBT can implement this as well.