Math.min(int, int) returns the lowest integer of the two, which would be World.getHighestBlockYAt(int, int) if it returned less than or equal to 0.