Since command blocks use a sphere to detect the distance between itself and some entity, you can create a cylinder from multiple spheres. Example:
/execute if entity @e[distance=..10] run ...
/execute positioned ~ ~5 ~ if entity @e[distance=..10] run ...
this will create more of a cylindrical shape with a width and length of 10 blocks and a height of around 15 or so blocks. As for the cube, I don't think you can construct a cube from spheres (well not an accurate one).
hi is it posible to teleport an entity away that is not in distance (cause that would be a sphere)
i want to teleport an entity away wehn it access a zylinder area or a cubic
like ditanse of 30 width and a high of 30
i hope everyone understand , i dont know how to say with my arful english xD
Since command blocks use a sphere to detect the distance between itself and some entity, you can create a cylinder from multiple spheres. Example:
this will create more of a cylindrical shape with a width and length of 10 blocks and a height of around 15 or so blocks. As for the cube, I don't think you can construct a cube from spheres (well not an accurate one).
Command block engineer // Developer // #TeamTrees
Thank u it works
for cube i found that example too
/execute at @e[type=minecraft:armor_stand,sort=nearest,limit=1] positioned ~-5 ~ ~-5 as @a[dx=10,dy=10,dz=10] at @s run teleport @s ^ ^ ^-1