Fix ArrayIndexOutOfBounds exception placing some TEs near bedrock.

Signed-off-by: Ross Allan <rallanpcl@gmail.com>