
Random Blocks
The world is made of random blocks!
With this update, full blocks are 3x more common than other blocks. This improves rendering significantly. (In addition, block entities are still half as common than other blocks.)
However, this version is still a test as I am hoping to find a workable ratio of full blocks to other blocks.
Fixed a runaway marker problem which was causing a lot of lag. The datapack now mostly works!
Also, fixed so the datapack works in all dimensions (instead of just the Overworld).
Chunk generation is now asynchronous. The update loop now marks layers to be generated, and at most one layer is generated each tick.
Block entities are now half as common, but it doesn't seem like it helped much.
Optimization!
I figured out that I can just use a loot table for all my random block selection needs. In addition, this version splits chunks into 16x16x16 subchunks, and generates the subchunks individually. This gets rid of most of the insane lag spikes. However, the game is still slow due to large numbers of block entities being rendered at once. (And the lag spikes from generating subchunks are still noticeable.)
Due to the huge speed-up, it now attempts to generate up to 2 subchunks every 40 ticks (2 seconds).
I plan to make it even faster by generating each layer (Y-level) of each subchunk individually.
Simple method where we iterate over every block in a chunk and generate random blocks. To prevent command limit problems, the list of blocks are split into 116 files, each containing 10 blocks (except for the last one which only has 8). The function to use is determined with a macro.
Unfortunately, this doesn't work very well at all.
This version causes insane (10+ seconds) lag spikes whenever chunks are being generated, and huge numbers of entities (4000+) are created. Because of this, it currently only attempts to create a new chunk once every 5 seconds.

