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

Method UnboundedRelGetBlockMeta

src/Chunk.cpp:1130–1145  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1128
1129
1130bool 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

Callers 3

CanBeAtMethod · 0.80
CanBeAtMethod · 0.80
CanBeAtMethod · 0.80

Calls 2

GetMetaMethod · 0.80
IsValidMethod · 0.45

Tested by

no test coverage detected