Perlin noise implementation in Java