Checks against maximum height of the world rather than hard-coding 255