Talk:Custom world generation/processor list/predicate

axis_aligned_linear_pos testing and how it works
I ran through dozens of tests to really get a feel for how this particular position predicate works and I'll lay it out here:

axis: x y or z, determines the direction of the block replacement to occur.

min_dist and max_dist corresponds to the minimum number of blocks and maximum number of blocks to count away from the origin. The origin isthe block where the structure is generated (typically a jigsaw block). Importantly this only determines the transition distance and not the minimum and maximum distance that the blocks can be replaced. The min_chance and max_chance corresponds to the values of the min_dist and max_dist respectively.

For example, if you create a 15x15x1 cobblestone wall with a jigsaw block at the base of it vertically but in the center horizontally, and then use the following position predicate: { "position_predicate": { "predicate_type": "minecraft:axis_aligned_linear_pos", "axis": "y", "min_dist": 2, "max_dist": 6, "min_chance": 0.9, "max_chance": 0.1 }, "location_predicate": { "predicate_type": "minecraft:always_true" }, "input_predicate": { "predicate_type": "minecraft:block_match", "block": "minecraft:cobblestone" },  "output_state": { "Name": "minecraft:mossy_cobblestone" } }

In this case rows 0, 1, and 2 (note these builds are 0 based) would be replaced at a rate of 0.9 or 90%. Rows 6-14 (note because the structure is 0 based, 14 and not 15 is the max value) would be replaced at a rate of 0.1 or 10%. Rows 3, 4, and 5 is where the transition would occur. It will smoothly transition these over the range so that row 3 would be replaced at 0.7, row 4 would be replaced at 0.5, and row 5 would be replaced at 0.3.

How would this change if the jigsaw block was in the direct center of the wall both horizontally and vertically?

Rows 5-9 would be replace at a rate of 0.9 or 90%. The center in this case would be at row 7, and + or - 2 (the min dist) would give you the range 5-9. Rows 13 and 14, and rows 1 and 0 would be replaced at the 0.1 or 10% rate. Again, you count out the additional 4 in either direction. Rows 4-3, and rows 10-12 would be your transition ranges as details above, just going in either direction.

I think there are two important clarifying points that need to be made on the main article.

1. What is the origin? For jigsaw structures it'll be the location of the jigsaw block. For structures that are placed in the world not via a jigsaw I'm still not clear what this point would be.

2. That the min and max values will apply to anything beyond those values as well. My first though was that setting the transition distance from 0-5, and the transition chance from .9 to .1 would mean that the wall would be 90% mossy at row 0, 70% at row 1, 50% at row 2, 30% at row 3, and 10% at row 4, and it will not do anything beyond that. Importantly it will apply the 10% from row 4 and up.