How to place a block in a random area within a radius
First, summon an ArmorStand:
/summon ArmorStand ~ ~ ~ {Marker:1,Invisible:1,NoGravity:1,Invulnerable:1,CustomName:"Platformer"}
While the floor is still in place, to generate a platform, use /spreadplayers
to put the ArmorStand in a random location:
/spreadplayers X Z 0 D false @e[name=Platformer,type=ArmorStand]
Replace X
and Z
with the coordinates of the center of your arena, and D
with the distance from center to edge of the arena:
After spreading the ArmorStand
, have it replace the floor below it with another block type (you can use something like monster egg stone if you want the platforms to look the same as the original floor):
/execute @e[type=ArmorStand,name=Platformer] ~ ~ ~ /fill ~1 ~-1 ~1 ~-1 ~-1 ~-1 cobblestone 0 replace stone
You should then be able to replace the original floor block with air (in this example I'm using stone) to have only the platforms still existing:
/fill X1 Y1 Z1 X2 Y2 Z2 air 0 replace stone