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

Method CheckBlocks

src/Chunk.cpp:752–772  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

750
751
752void cChunk::CheckBlocks()
753{
754 if (m_ToTickBlocks.size() == 0)
755 {
756 return;
757 }
758 std::vector<unsigned int> ToTickBlocks;
759 std::swap(m_ToTickBlocks, ToTickBlocks);
760
761 cChunkInterface ChunkInterface(m_World->GetChunkMap());
762 cBlockInServerPluginInterface PluginInterface(*m_World);
763
764 for (std::vector<unsigned int>::const_iterator itr = ToTickBlocks.begin(), end = ToTickBlocks.end(); itr != end; ++itr)
765 {
766 unsigned int index = (*itr);
767 Vector3i BlockPos = IndexToCoordinate(index);
768
769 cBlockHandler * Handler = BlockHandler(GetBlock(index));
770 Handler->Check(ChunkInterface, PluginInterface, BlockPos.x, BlockPos.y, BlockPos.z, *this);
771 } // for itr - ToTickBlocks[]
772}
773
774
775

Callers

nothing calls this directly

Calls 6

BlockHandlerFunction · 0.85
sizeMethod · 0.80
GetChunkMapMethod · 0.80
beginMethod · 0.80
endMethod · 0.80
CheckMethod · 0.45

Tested by

no test coverage detected