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

Method LockedSetBlock

src/ChunkMap.cpp:276–289  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

274
275
276bool cChunkMap::LockedSetBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
277{
278 // We already have m_CSLayers locked since this can be called only from within the tick thread
279 int ChunkX, ChunkZ;
280 cChunkDef::AbsoluteToRelative(a_BlockX, a_BlockY, a_BlockZ, ChunkX, ChunkZ);
281 cChunkPtr Chunk = GetChunkNoLoad(ChunkX, ZERO_CHUNK_Y, ChunkZ);
282 if (Chunk == NULL)
283 {
284 return false;
285 }
286
287 Chunk->SetBlock(a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta);
288 return true;
289}
290
291
292

Callers

nothing calls this directly

Calls 1

SetBlockMethod · 0.45

Tested by

no test coverage detected