Skip to content

Patterns

pop4959 edited this page Mar 10, 2024 · 4 revisions

Patterns

Chunky has the ability to generate chunks in a few different patterns. This does not change anything about how many chunks generate, but simply changes the order that they are generated in.

The command for changing the generation pattern is chunky pattern <pattern>.

There are currently four patterns available, each of which are explained below.


Region

The default and recommended pattern. This pattern generates regions on each annulus in a concentric square shape starting from the center. Full regions are generated efficiently using a Hilbert space-filling curve on the chunks within the region which guarantees high locality.

Concentric

This pattern generates chunks on each annulus in a concentric square shape starting from the center. This was the default pattern in older versions of chunky, however was replaced by the similar but more efficient region pattern.

Loop

This pattern generates chunks starting from the most negative X/Z chunk coordinate, spanning across to the most positive X/Z coordinate.

Spiral

This pattern generates chunks in a square spiral outwards starting from the center. Functionally, it behaves very much like the concentric pattern above.

CSV

For advanced users. This pattern generates chunks in a custom order specified in a CSV file in the configuration folder.

World

This is a special pattern which loads only chunks that already exist in the world. It first scans the world to determine what chunks need to be visited, and those chunks will be visited in an undetermined order, by region file. This pattern writes to CSV and can be re-loaded / continued as CSV after initial scanning.


The following diagram illustrates how some of the built-in patterns work. Each square represents a chunk, and by following the line drawn you can visualize the order in which chunks generate. Note that the default concentric pattern is identical to the spiral pattern for all intents and purposes.