how to detect all blocks or entites within a sphere

Started by Totally not a crow on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to detect all blocks or entites within a sphere

i am making a mod where i need a block to detect all or specific types entities or blocks within a large sphere, e.g; for all stone blocks within a 100 block sphere to be replaced with cobble stone or for all entities within a 5 block sphere to get levitation e.c.t, i do not know if this is even possible in Mcreator but i have tried and do not understand how i am supposed to do this. any help would be appreciated as i am quite clueless here, thanks 

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
You could probably do…
Fri, 07/04/2025 - 19:47

You could probably do something using this: https://mcreator.net/forum/114737/tutorial-circles-cylinders-spheres-etc maybe paired with the for each entity within square cube of radius 4 procedure block reduced to radius 1 or 2. It might be a bit resource-intensive, but you could probably work something out for what you want to do.