HomeJavaDatapacksRadial Patterns
Radial Patterns
DatapacksJava

Radial Patterns

by AmogusAzul · on Modrinth

Minecraft datapack library for randomized radial callback patterns. Free Minecraft Java datapack for 26.2.

⬇ Download on Modrinth

Radial Patterns

Radial Patterns is a small Minecraft Java Edition datapack library for running your own functions across randomized block patterns around an origin.

It does not change blocks, damage entities, or run on tick by itself. Other datapacks call it and provide the functions that should run at each selected position.

Good fits include splashes, bursts, weathering, corrosion, frost, magic effects, mining tools, and other effects that should feel irregular without doing live raycasts.

Compatibility

Install

Download the release zip and put it in your world's datapacks folder:

<world>/datapacks/radial-patterns-<version>.zip

Then run:

/reload

Use

Call radial_patterns:apply at the center of your effect and pass one callback function for each layer:

execute positioned <x> <y> <z> run function radial_patterns:apply {outer_func:"example:outer",middle_func:"example:middle",inner_func:"example:inner"}

Each callback runs at the block positions selected for that layer. The layers run in this order:

outer
middle
inner

Coordinates can overlap, so the same position may receive more than one callback execution. This is useful for effects that should become stronger toward the center.

Example

Create a callback:

# data/example/function/puff.mcfunction
particle minecraft:dust{color:[1.0,0.2,0.1],scale:0.8} ~ ~ ~ 0.18 0.18 0.18 0 4 force

Call the library:

execute at @s run function radial_patterns:apply {outer_func:"example:puff",middle_func:"example:puff",inner_func:"example:puff"}

For block-changing effects, keep callbacks cheap and reject irrelevant blocks first:

execute if block ~ ~ ~ #example:affected_blocks run function example:process_block

Shape

The generated patterns use 81 possible relative coordinates:

This gives a compact radius-two shape without scanning every corner of a full 5x5x5 cube.

Each invocation randomly selects one generated pattern from each layer. The default release includes 8 patterns per layer, for 8 x 8 x 8 = 512 possible layer combinations.

Developer Notes

Repository layout

radial-patterns/
├── data/
│   ├── minecraft/tags/function/load.json
│   ├── radial_patterns/function/apply.mcfunction
│   ├── radial_patterns/function/load.mcfunction
│   ├── radial_patterns/function/dispatch/
│   ├── radial_patterns/function/patterns/
│   └── radial_patterns_test/function/puff.mcfunction
├── tools/generate-patterns.py
├── pack.mcmeta
├── pack.png
├── README.md
└── LICENSE

Regenerate patterns

Pattern and dispatcher files are generated ahead of time:

python3 tools/generate-patterns.py --clean --patterns 8 --seed 365 --manifest build/pattern-manifest.json

The generator validates that every coordinate is inside the canonical 81-coordinate shape and avoids duplicate patterns within each layer.

Export a release zip

From the repository root:

mkdir -p dist
zip -r dist/radial-patterns-1.0.0.zip pack.mcmeta pack.png data -x '*/.DS_Store'

Upload that zip to Modrinth as the datapack file.

Test locally

  1. Copy or symlink the repo into a world's datapacks folder.
  2. Run /reload.
  3. Run the included particle test:
execute positioned ~ ~ ~ run function radial_patterns:apply {outer_func:"radial_patterns_test:puff",middle_func:"radial_patterns_test:puff",inner_func:"radial_patterns_test:puff"}

Expected behavior: a randomized clustered particle burst appears inside the radius-two shape, and repeated calls vary because each layer selects a random generated pattern.

Verified by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more