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

Method UnboundedRelFastSetBlock

src/Chunk.cpp:1237–1252  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1235
1236
1237bool cChunk::UnboundedRelFastSetBlock(int a_RelX, int a_RelY, int a_RelZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
1238{
1239 if ((a_RelY < 0) || (a_RelY > cChunkDef::Height))
1240 {
1241 LOGWARNING("UnboundedRelFastSetBlock(): requesting a block with a_RelY out of range: %d", a_RelY);
1242 return false;
1243 }
1244 cChunk * Chunk = GetRelNeighborChunkAdjustCoords(a_RelX, a_RelZ);
1245 if ((Chunk == NULL) || !Chunk->IsValid())
1246 {
1247 // The chunk is not available, bail out
1248 return false;
1249 }
1250 Chunk->FastSetBlock(a_RelX, a_RelY, a_RelZ, a_BlockType, a_BlockMeta);
1251 return true;
1252}
1253
1254
1255

Callers

nothing calls this directly

Calls 2

IsValidMethod · 0.45
FastSetBlockMethod · 0.45

Tested by

no test coverage detected