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

Method ForEachDropSpenser

src/Chunk.cpp:2033–2049  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2031
2032
2033bool cChunk::ForEachDropSpenser(cDropSpenserCallback & a_Callback)
2034{
2035 // The blockentity list is locked by the parent chunkmap's CS
2036 for (cBlockEntityList::iterator itr = m_BlockEntities.begin(), itr2 = itr; itr != m_BlockEntities.end(); itr = itr2)
2037 {
2038 ++itr2;
2039 if (((*itr)->GetBlockType() != E_BLOCK_DISPENSER) && ((*itr)->GetBlockType() != E_BLOCK_DROPPER))
2040 {
2041 continue;
2042 }
2043 if (a_Callback.Item((cDropSpenserEntity *)*itr))
2044 {
2045 return false;
2046 }
2047 } // for itr - m_BlockEntitites[]
2048 return true;
2049}
2050
2051
2052

Callers 1

Calls 4

beginMethod · 0.80
endMethod · 0.80
GetBlockTypeMethod · 0.45
ItemMethod · 0.45

Tested by

no test coverage detected