| 1965 | |
| 1966 | |
| 1967 | bool cChunk::ForEachChest(cChestCallback & a_Callback) |
| 1968 | { |
| 1969 | // The blockentity list is locked by the parent chunkmap's CS |
| 1970 | for (cBlockEntityList::iterator itr = m_BlockEntities.begin(), itr2 = itr; itr != m_BlockEntities.end(); itr = itr2) |
| 1971 | { |
| 1972 | ++itr2; |
| 1973 | if ((*itr)->GetBlockType() != E_BLOCK_CHEST) |
| 1974 | { |
| 1975 | continue; |
| 1976 | } |
| 1977 | if (a_Callback.Item((cChestEntity *)*itr)) |
| 1978 | { |
| 1979 | return false; |
| 1980 | } |
| 1981 | } // for itr - m_BlockEntitites[] |
| 1982 | return true; |
| 1983 | } |
| 1984 | |
| 1985 | |
| 1986 |
no test coverage detected