MCPcopy Create free account
hub / github.com/cuberite/cuberite / UnboundedRelGetBlockBlockLight

Method UnboundedRelGetBlockBlockLight

src/Chunk.cpp:1151–1166  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1149
1150
1151bool cChunk::UnboundedRelGetBlockBlockLight(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE & a_BlockBlockLight) const
1152{
1153 if ((a_RelY < 0) || (a_RelY >= cChunkDef::Height))
1154 {
1155 LOGWARNING("%s: requesting a block with a_RelY out of range: %d", __FUNCTION__, a_RelY);
1156 return false;
1157 }
1158 cChunk * Chunk = GetRelNeighborChunkAdjustCoords(a_RelX, a_RelZ);
1159 if ((Chunk == NULL) || !Chunk->IsValid())
1160 {
1161 // The chunk is not available, bail out
1162 return false;
1163 }
1164 a_BlockBlockLight = Chunk->GetBlockLight(a_RelX, a_RelY, a_RelZ);
1165 return true;
1166}
1167
1168
1169

Callers

nothing calls this directly

Calls 2

IsValidMethod · 0.45
GetBlockLightMethod · 0.45

Tested by

no test coverage detected