Sounds good to me. Should be noted we don't lock on reads at all at the moment, but we probably need it with the new sparse arrays I guess (ReentrantReadWriteLock would work nicely, obviously).Hm... Well, i think the WorldView is a good starting point that can be refined... For example, in my opinion, the chunks should not bother about encapsulation at all. There should be no get/set methods for data on the chunks themselves. They only need to have getters to retrieve the arrays. The views can implement encapsulation. If we distinguish between read/write and read-only access we can also refine the locking mechanism into a read/write lock.
Hmm. I would suggest if you're going to do that... Keep the chunk size the same as it is, and modify the world generator to produce stone/air chunks for non-zero chunk Y positions. Then you won't have to change the main world generation algorithms at all. Light propagation would still need to be updated. This also avoids futzing around with world views, which are not supported by many of the world generation algorithms at the moment anyway.I was thinking about some kind of "virtual height limit", so the existing terrain generators and light propagation wouldn't have to be changed right now. (Would be easier for me... ) Lets say we have chunks of size 16x16x16. I would then simply generate 16 chunks vertically stacked and have the terrain and light algos work on them through a world view. The algos wouldn't have to know about the internal chunk size, they would just continue to work as always. The virtual height limit could be made configurable through the "create world" dialog.
The LocalChunkProvider would be aware of the virtual height limit and create the chunks accordingly. Above and below the virtual height limit it would just create chunks on demand. Above the limit the chunks would just be filled with air, below they would be filled with stone.
Ultimately I think the target chunk size should be 16x128x16 - this would work well with the proposed sunlight algorithm.