Started by
AAAAAAAAA
on
Topic category: Help with MCreator software
Hello, anyone can help me? How to calculate a number of blocks (air) from surface block to player (for y coordinate)
Topic category: Help with MCreator software
Hello, anyone can help me? How to calculate a number of blocks (air) from surface block to player (for y coordinate)
here's how I would approach the problem:
first, subtract the player y value from the surface height. if the value is positive, start at the player, and make a loop that checks each block between the player and the surface. every time the loop detects air, add one to a variable. if the value for the initial subtraction is negative, do the same thing except starting at the surface and going up to the player.
But what if player fly or very high?