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

Method BroadcastBlockEntity

src/Chunk.cpp:2680–2696  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2678
2679
2680void cChunk::BroadcastBlockEntity(int a_BlockX, int a_BlockY, int a_BlockZ, const cClientHandle * a_Exclude)
2681{
2682 // We can operate on entity pointers, we're inside the ChunkMap's CS lock which guards the list
2683 cBlockEntity * Entity = GetBlockEntity(a_BlockX, a_BlockY, a_BlockZ);
2684 if (Entity == NULL)
2685 {
2686 return;
2687 }
2688 for (cClientHandleList::iterator itr = m_LoadedByClient.begin(); itr != m_LoadedByClient.end(); ++itr )
2689 {
2690 if (*itr == a_Exclude)
2691 {
2692 continue;
2693 }
2694 Entity->SendTo(*(*itr));
2695 } // for itr - LoadedByClient[]
2696}
2697
2698
2699

Callers 1

SetSignLinesMethod · 0.45

Calls 3

beginMethod · 0.80
endMethod · 0.80
SendToMethod · 0.45

Tested by

no test coverage detected