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

Method LockedFastSetBlock

src/ChunkMap.cpp:295–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

293
294
295bool cChunkMap::LockedFastSetBlock(int a_BlockX, int a_BlockY, int a_BlockZ, BLOCKTYPE a_BlockType, NIBBLETYPE a_BlockMeta)
296{
297 // We already have m_CSLayers locked since this can be called only from within the tick thread
298 int ChunkX, ChunkZ;
299 cChunkDef::AbsoluteToRelative(a_BlockX, a_BlockY, a_BlockZ, ChunkX, ChunkZ);
300 cChunkPtr Chunk = GetChunkNoLoad(ChunkX, ZERO_CHUNK_Y, ChunkZ);
301 if (Chunk == NULL)
302 {
303 return false;
304 }
305
306 Chunk->FastSetBlock(a_BlockX, a_BlockY, a_BlockZ, a_BlockType, a_BlockMeta);
307 return true;
308}
309
310
311

Callers

nothing calls this directly

Calls 1

FastSetBlockMethod · 0.45

Tested by

no test coverage detected