Guest User

Untitled

a guest
Jul 17th, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. private int method42(int z, int y, int x) {
  2. int posX = x >> 7;
  3. int posY = y >> 7;
  4. if(posX < 0 || posY < 0 || posX > 103 || posY > 103) {
  5. return 0;
  6. }
  7. int posZ = z;
  8. if(posZ < 3 && (byteGroundArray[1][posX][posY] & 2) == 2) {
  9. posZ++;
  10. }
  11. int x2 = x & 0x7f;
  12. int y2 = y & 0x7f;
  13. int i2 = intGroundArray[posZ][posX][posY] * (128 - x2) + intGroundArray[posZ][posX + 1][posY] * x2 >> 7;
  14. int j2 = intGroundArray[posZ][posX][posY + 1] * (128 - x2) + intGroundArray[posZ][posX + 1][posY + 1] * x2 >> 7;
  15. return i2 * (128 - y2) + j2 * y2 >> 7;
  16. }
Add Comment
Please, Sign In to add comment