How to make function like this?

Started by winicu on Wed, 11/23/2022 - 01:05

Topic category: Help with modding (Java Edition)

Last seen on 01:16, 21. Dec 2022
Joined Nov 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • Tracker tickets:
  • MCreator plugins:
  • Comments:
How to make function like this?
Wed, 11/23/2022 - 01:05

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.