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

Method ForEachDropper

src/Chunk.cpp:2011–2027  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2009
2010
2011bool cChunk::ForEachDropper(cDropperCallback & a_Callback)
2012{
2013 // The blockentity list is locked by the parent chunkmap's CS
2014 for (cBlockEntityList::iterator itr = m_BlockEntities.begin(), itr2 = itr; itr != m_BlockEntities.end(); itr = itr2)
2015 {
2016 ++itr2;
2017 if ((*itr)->GetBlockType() != E_BLOCK_DROPPER)
2018 {
2019 continue;
2020 }
2021 if (a_Callback.Item((cDropperEntity *)*itr))
2022 {
2023 return false;
2024 }
2025 } // for itr - m_BlockEntitites[]
2026 return true;
2027}
2028
2029
2030

Callers 1

ForEachDropperInChunkMethod · 0.80

Calls 4

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

Tested by

no test coverage detected