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)

Active 4 months ago
Joined Feb 2023
Points:
213

User statistics:

  • Modifications: 1
  • Forum topics: 4
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 2
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.
 

Active 1 month ago
Joined May 2022
Points:
1159

User statistics:

  • Modifications: 14
  • Forum topics: 23
  • Wiki pages: 0
  • MCreator plugins: 0
  • Comments: 1141
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.