perf(chunk-sparse-array): replace dense arrays to sparse arrays for lightdata.
It should helps with LOD's chunks preload with minimal memory footprint.
writes/reads sparse arrays faster at 4-5% then dense  array(O_O, see jmh benchmark) then we can use it to batch writing at firsts stages - lightgeneration/merging.
import org.terasology.world.chunks.blockdata.TeraArray;
import org.terasology.world.chunks.blockdata.TeraDenseArray16Bit;
import org.terasology.world.chunks.blockdata.TeraDenseArray8Bit;
+import org.terasology.world.chunks.blockdata.TeraSparseArray8Bit;
import org.terasology.world.chunks.deflate.TeraDeflator;
import org.terasology.world.chunks.deflate.TeraStandardDeflator;
@@ -82,9 +83,9 @@ public ChunkImpl(Vector3ic chunkPos, TeraArray blocks, TeraArray[] extra, BlockM
this.chunkPos.set(Preconditions.checkNotNull(chunkPos));
this.blockData = Preconditions.checkNotNull(blocks);
this.extraData = Preconditions.checkNotNull(extra);
- sunlightData = new TeraDenseArray8Bit(getChunkSizeX(), getChunkSizeY(), getChunkSizeZ());
- sunlightRegenData = new TeraDenseArray8Bit(getChunkSizeX(), getChunkSizeY(), getChunkSizeZ());
- lightData = new TeraDenseArray8Bit(getChunkSizeX(), getChunkSizeY(), getChunkSizeZ());
+ sunlightData = new TeraSparseArray8Bit(getChunkSizeX(), getChunkSizeY(), getChunkSizeZ());
+ sunlightRegenData = new TeraSparseArray8Bit(getChunkSizeX(), getChunkSizeY(), getChunkSizeZ());
+ lightData = new TeraSparseArray8Bit(getChunkSizeX(), getChunkSizeY(), getChunkSizeZ());
dirty = true;
this.blockManager = blockManager;
region = new BlockRegion(
