Need help finding a block in a radius at a specific Y coordinate, and teleporting the player to it in mcreator 2024.4

Started by Okira on

Topic category: Help with Minecraft modding (Java Edition)

Joined Jun 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Need help finding a block in a radius at a specific Y coordinate, and teleporting the player to it in mcreator 2024.4

I have a procedure that I thought would work, and had help from friends who are better at java stuff than I, but it doesn't seem to be saving the coordinates in the variables I gave it whether they be global or not. It prints that it found air but never actually works, there were many iterations of this code before I caved and made an account here to ask how I should fix it. 

The current Iteration

Sorry if it looks like a mess, again I tried several times for this code to work, and it doesn't have a global procedure as it's called externally. 
Thanks in advance if you decide to help. 

Joined Jun 2025
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Oh and I only put the break…
Mon, 06/23/2025 - 03:48

Oh and I only put the break loops after the coordinate loop recently in an attempt to figure out why the variables were being funky