How to make a procedure that will check all blocks of the same type in a certain radius

Started by Ball-van on

Topic category: Help with modding (Java Edition)

Last seen on 18:29, 16. Mar 2024
Joined Apr 2021
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make a procedure that will check all blocks of the same type in a certain radius
Fri, 07/29/2022 - 20:23 (edited)

Hi all!

I need to make a procedure that will check vlocks in a certain radius - a cube.

For example, I need to check that in a 5x5x5 radius all blocks are air blocks.

Yes, it can be done manually, but it will be very long and tedious.

if anyone knows how to make a procedure that will immediately check this radius, then please tell me.

Edited by Ball-van on Fri, 07/29/2022 - 20:23
Last seen on 06:47, 29. Mar 2023
Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I'm curious as well, I only…
Mon, 02/27/2023 - 22:03

I'm curious as well, I only just started using MCreator yesterday

Last seen on 06:47, 29. Mar 2023
Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
I figured out a way to do it…
Tue, 02/28/2023 - 18:21

I figured out a way to do it! The most important part is keeping a count of how many blocks in the defined area meet/don't meet the requirements

Here's something I whipped up, and the area is customizable to be any odd number of blocks wide/long/tall

The area will always be centered on the source.

code blocks