If the landscape is a picture you have two options:
1 - Look at all the pixel values and do some sort of color comparison at any given X to find what the floor is at that position. i.e.
public int get groundHeightAtX(int x, int startY)
int testArray = new int;
for (int y = startY; y < ground.getData().getHeight(); y++)
int pixels = ground.getData().getPixel(x,y,testArray);
if (pixels == groundColor && pixels == groundColor && pixels == groundColor && pixels == groundColor)
If you do that, it would be smart to cache the values for every X (in another array, probably) so that you're not calling this constantly for every single entity.
2 - Create some sort of geometry that represents the ground, probably a bunch of points - you'd find which points that you lie between and then use the slope of the line to decide the height at that particular point. Faster but requires more effort.