Hello everybody! I have a big problem with world generation.
Generation occurs in this way: when blocks outside the visibility zone are destroyed, and when they are not there and they should be, the system creates them, extracting data from the array.
The array is filled from the beginning of the game, where the entire map is generated.
So here's the problem. When I go a little further, the generation breaks down. Sometimes just world lines appear and the blocks are not destroyed. Sometimes everything works fine, but only on the right side! On the left, blocks are created endlessly, which loads the system.
Please help and give recommendations if possible.
File: drive.google.com/file/d/1txtscins4qLjHBGTcQ9noY0boVb49mB0/view