Guest User

Untitled

a guest
Jul 16th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. uint8_t &world::block(uint16_t x,uint16_t y,uint16_t z)
  2. {
  3. if (x >= x_size ||
  4. y >= y_size ||
  5. z >= z_size)
  6. {
  7. throw std::runtime_error("world::block(): Index out of bounds");
  8. }
  9. return map[(((y * z_size) + z) * x_size) + x];
  10. }
Add Comment
Please, Sign In to add comment