How to make function like this?

Started by winicu on

Topic category: Help with modding (Java Edition)

Last seen on 03:51, 15. Dec 2023
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How to make function like this?

I'm making a ore-finding wand.

How to make a procedure works like i list below?

1. Find target block in 16x16x16 area.

2. If  find success in step 1, teleport player to the nearest target block, if the target block is underground, teleport player to the nearest place on ground.

3.If didn't find in  step 1,  teleport player to a safe, onground place within 8x8 area.