## --- THE ABSOLUTE CENTER (3x3 Solid Core) ---
setblock ~ ~-1 ~ red_sand
execute if predicate kiwi2:chance_random_80 run setblock ~1 ~-1 ~0 sand
execute if predicate kiwi2:chance_random_80 run setblock ~-1 ~-1 ~0 red_sand
execute if predicate kiwi2:chance_random_80 run setblock ~0 ~-1 ~1 sand
execute if predicate kiwi2:chance_random_80 run setblock ~0 ~-1 ~-1 sandstone
execute if predicate kiwi2:chance_random_80 run setblock ~1 ~-1 ~1 smooth_sandstone
execute if predicate kiwi2:chance_random_80 run setblock ~-1 ~-1 ~1 sand
execute if predicate kiwi2:chance_random_80 run setblock ~1 ~-1 ~-1 red_sand
execute if predicate kiwi2:chance_random_80 run setblock ~-1 ~-1 ~-1 smooth_red_sandstone

## --- THE INNER FILL (Radius 2) ---
execute if predicate kiwi2:chance_random_70 run setblock ~2 ~-1 ~0 red_sand
execute if predicate kiwi2:chance_random_70 run setblock ~-2 ~-1 ~0 sand
execute if predicate kiwi2:chance_random_70 run setblock ~0 ~-1 ~2 sandstone
execute if predicate kiwi2:chance_random_70 run setblock ~0 ~-1 ~-2 red_sand
execute if predicate kiwi2:chance_random_60 run setblock ~2 ~-1 ~1 sand
execute if predicate kiwi2:chance_random_60 run setblock ~-2 ~-1 ~1 sand
execute if predicate kiwi2:chance_random_60 run setblock ~1 ~-1 ~2 red_sand
execute if predicate kiwi2:chance_random_60 run setblock ~-1 ~-1 ~-2 sandstone
execute if predicate kiwi2:chance_random_60 run setblock ~2 ~-1 ~2 smooth_sandstone
execute if predicate kiwi2:chance_random_60 run setblock ~-2 ~-1 ~-2 red_sand

## --- THE OUTER BLEND (Radius 3) ---
execute if predicate kiwi2:chance_random_50 run setblock ~3 ~-1 ~0 red_sand
execute if predicate kiwi2:chance_random_50 run setblock ~-3 ~-1 ~0 sand
execute if predicate kiwi2:chance_random_50 run setblock ~0 ~-1 ~3 sandstone
execute if predicate kiwi2:chance_random_50 run setblock ~0 ~-1 ~-3 red_sand
execute if predicate kiwi2:chance_random_40 run setblock ~3 ~-1 ~1 sand
execute if predicate kiwi2:chance_random_40 run setblock ~-3 ~-1 ~-1 red_sand
execute if predicate kiwi2:chance_random_40 run setblock ~1 ~-1 ~3 smooth_sandstone
execute if predicate kiwi2:chance_random_40 run setblock ~-1 ~-1 ~-3 sand
execute if predicate kiwi2:chance_random_40 run setblock ~3 ~-1 ~2 red_sand
execute if predicate kiwi2:chance_random_40 run setblock ~-3 ~-1 ~-2 sand
execute if predicate kiwi2:chance_random_40 run setblock ~2 ~-1 ~3 sandstone
execute if predicate kiwi2:chance_random_40 run setblock ~-2 ~-1 ~-3 red_sand
execute if predicate kiwi2:chance_random_40 run setblock ~3 ~-1 ~3 smooth_red_sandstone
execute if predicate kiwi2:chance_random_40 run setblock ~-3 ~-1 ~-3 sand

## --- THE FRINGE SCATTER (Radius 4 & 5) ---
## These create the "scrambled" look at the very edges
execute if predicate kiwi2:chance_random_30 run setblock ~4 ~-1 ~0 red_sand
execute if predicate kiwi2:chance_random_30 run setblock ~-4 ~-1 ~0 sand
execute if predicate kiwi2:chance_random_30 run setblock ~0 ~-1 ~4 sandstone
execute if predicate kiwi2:chance_random_30 run setblock ~4 ~-1 ~4 sand
execute if predicate kiwi2:chance_random_20 run setblock ~5 ~-1 ~0 red_sand
execute if predicate kiwi2:chance_random_20 run setblock ~-5 ~-1 ~0 sandstone
execute if predicate kiwi2:chance_random_20 run setblock ~0 ~-1 ~5 sand
execute if predicate kiwi2:chance_random_20 run setblock ~3 ~-1 ~4 red_sand
execute if predicate kiwi2:chance_random_20 run setblock ~-3 ~-1 ~-4 sandstone
execute if predicate kiwi2:chance_random_20 run setblock ~4 ~-1 ~3 sand
execute if predicate kiwi2:chance_random_20 run setblock ~-4 ~-1 ~-3 red_sand

place feature patch_cactus ~ ~ ~
execute if predicate kiwi2:chance_random_80 run place feature patch_cactus ~ ~ ~1
execute if predicate kiwi2:chance_random_80 run place feature patch_cactus ~1 ~ ~
execute if predicate kiwi2:chance_random_80 run place feature patch_cactus ~-1 ~ ~-1
execute if predicate kiwi2:chance_random_80 run place feature patch_cactus ~ ~ ~-1
execute if predicate kiwi2:chance_random_80 run place feature patch_cactus ~-1 ~ ~
execute if predicate kiwi2:chance_random_80 run place feature patch_cactus ~1 ~ ~1

execute if predicate kiwi2:chance_random_30 run function kiwi2:run_dimension/platforms/desert_platform/natural_mobs/cactus_zombie
execute if predicate kiwi2:chance_random_10 run function kiwi2:run_dimension/platforms/desert_platform/natural_mobs/cactus_zombie
execute if predicate kiwi2:chance_random_10 run function kiwi2:run_dimension/platforms/desert_platform/natural_mobs/cactus_zombie

tag @s add desert_platform_marker_placed
