How get highest block at location

How get highest block at location? sponge does not contain “world.getHighestBlockAt (location.getBlockX (), location.getBlockZ ()). getY ()” as in bukkit

Last I checked, you would just iterate down the blocks at the x,z coords until you reach the first solid block

Could do

World world;
world.getHighestYAt(x, z);
1 Like