How do i get the highest non air block position from X and Z coordinates?

Started by JarikTSM on

Topic category: Help with Minecraft modding (Java Edition)

Joined Feb 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How do i get the highest non air block position from X and Z coordinates?

Im making an ICBM but i cant figgue out how to get the highest position in certain X,Z coordinates so the rocket doesnt just phase trough the ground if use XYZ.
 

Joined May 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Use the 'world surface…
Wed, 04/10/2024 - 14:16

Use the 'world surface height' function. It returns the highest solid block when provided an x/z value.