Well, I have an idea, but it is more involved and I am not sure if it can be done in GDScript (can fit into the scene tree), and even if it is a solution to your question which might be asking something much simpler.
Here's a sketch, interpreting "inifnite" as very big (tens or hundreds of thousands of units along sides), because infinite is such a lonely word, and that "blocks" means tiles of some extent that fit together to form a larger floor.
What's needed ?
- Either store the data on disk, or generate it on the fly.
This depends on what type of data there is, and what it represents. Need more info.
- A data structure to choose from.
Usually a tree structure that can easily and fast be traversed and chosen from. But can also be a linear structure if there aren't too many "blocks" = tiles.
- A mechanism to determine what's currently visible to the camera.
This is called frustum culling. The frustum is the volume of the viewing field of the camera. Leaves from the tree data structure (more precise bounding volumes) are checked against the frustum each frame to determine if they are visible or not.
- A mechanism to locate and load (or generate) relevant data.
Load the resource of what the frustum check has determined, keep it in memory, or drop resources that aren't needed any more. Optional: do this with some foresight.
- Optional: Things in a distance don't need the same resolution as nearby things. Speed rendering up with a LOD algorithm (level of detail). Godot has something (new?) built-in, but idk if it fits this case.
- Optional: Really huge extents of a floor (think 100.000s of units) will suffer from numerical precision problems very close to the camera. They will jitter. Similar problems will appear with depth range.
Implement a mechanism to keep distances small though the floor is huge. Rendering "relative to eye", that is putting the camera as the centre is one such method, but that is really advanced. Godot does not support this, this is actually where I fear the most that the approach might fail, or a lot of engine programming is necessary, including modifying shader vertex stages.
- For the engine: a connection to environment, global illumination, physics, collision, etc., or roll your own physics/collision because I am not sure (yet) if the engine's implementation has the flexibility.
Now, that's the sketch. I am doing this for heightmap terrain in C++ currently, but on and off because I have other things to do. Will take many months to complete.