Guest User

Untitled

a guest
Jun 11th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.82 KB | None | 0 0
  1.                     if (tile.cacheHeight == null) {
  2.                         if (z == 0) {
  3.                             tileHeights[0][x][y] = -HeightCalc.perlinNoise(baseX + x + 0xe3b7b, baseY + y + 0x87cce) * 8
  4.                         } else {
  5.                             tileHeights[z][x][y] = tileHeights[z - 1][x][y] - 240
  6.                         }
  7.                     } else {
  8.                         var height: Int = tile.cacheHeight!!
  9.                         if (height == 1) {
  10.                             height = 0
  11.                         }
  12.  
  13.                         if (z == 0) {
  14.                             tileHeights[0][x][y] = -height * 8
  15.                         } else {
  16.                             tileHeights[z][x][y] = tileHeights[z - 1][x][y] - height * 8
  17.                         }
  18.                     }
Advertisement
Add Comment
Please, Sign In to add comment