| 1128 | |
| 1129 | |
| 1130 | bool cChunk::UnboundedRelGetBlockMeta(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE & a_BlockMeta) const |
| 1131 | { |
| 1132 | if ((a_RelY < 0) || (a_RelY >= cChunkDef::Height)) |
| 1133 | { |
| 1134 | LOGWARNING("%s: requesting a block with a_RelY out of range: %d", __FUNCTION__, a_RelY); |
| 1135 | return false; |
| 1136 | } |
| 1137 | cChunk * Chunk = GetRelNeighborChunkAdjustCoords(a_RelX, a_RelZ); |
| 1138 | if ((Chunk == NULL) || !Chunk->IsValid()) |
| 1139 | { |
| 1140 | // The chunk is not available, bail out |
| 1141 | return false; |
| 1142 | } |
| 1143 | a_BlockMeta = Chunk->GetMeta(a_RelX, a_RelY, a_RelZ); |
| 1144 | return true; |
| 1145 | } |
| 1146 | |
| 1147 | |
| 1148 | |