| 84 | } |
| 85 | |
| 86 | CBlock Full_Chunk::getBlock(const Block::Position& position) const |
| 87 | { |
| 88 | int32_t yPositionSection = position.y / CHUNK_SIZE; |
| 89 | if (yPositionSection > static_cast<int>(m_chunkSections.size() - 1)) |
| 90 | { |
| 91 | return Block::ID::Air; |
| 92 | } |
| 93 | else |
| 94 | { |
| 95 | auto blockPos = Maths::Convert::chunkBlockToSectionBlockPosition(position); |
| 96 | |
| 97 | getSection(yPositionSection) |
| 98 | ->getBlock(blockPos); |
| 99 | } |
| 100 | return Block::ID::Air; |
| 101 | } |
| 102 | |
| 103 | CBlock Full_Chunk::qGetBlock(const Block::Position& position) const |
| 104 | { |
nothing calls this directly
no test coverage detected