| 163 | } |
| 164 | |
| 165 | cuboid cuboid::clampMap(bool block) |
| 166 | { |
| 167 | if (!Maps::IsValid() || !isValid()) { |
| 168 | clear(); |
| 169 | return *this; |
| 170 | } |
| 171 | |
| 172 | int32_t x, y, z; |
| 173 | if (block) |
| 174 | Maps::getSize(x, y, z); |
| 175 | else |
| 176 | Maps::getTileSize(x, y, z); |
| 177 | |
| 178 | return clamp(cuboid(0, 0, 0, x-1, y-1, z-1)); |
| 179 | } |
| 180 | |
| 181 | bool cuboid::addPos(int16_t x, int16_t y, int16_t z) |
| 182 | { |