Minecraft wiki entry for Generated_structures, associated text: Structures are generated for a given chunk after the terrain has been formed. The chunk format includes a tag called TerrainPopulated that indicates whether structures whose point of origin is in that chunk have been generated. If it is false or missing, it generates again. Structure generation is based on what is already in the chunk, so (for example) flagging a chunk that has already been populated for repopulation approximately doubles the amount of ore in it. When structures are generated, they can spill over into neighboring chunks that have been previously generated.