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

Method SetSignLines

src/Chunk.cpp:1734–1756  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1732
1733
1734bool cChunk::SetSignLines(int a_PosX, int a_PosY, int a_PosZ, const AString & a_Line1, const AString & a_Line2, const AString & a_Line3, const AString & a_Line4)
1735{
1736 // Also sends update packets to all clients in the chunk
1737 for (cBlockEntityList::iterator itr = m_BlockEntities.begin(); itr != m_BlockEntities.end(); ++itr)
1738 {
1739 if (
1740 ((*itr)->GetPosX() == a_PosX) &&
1741 ((*itr)->GetPosY() == a_PosY) &&
1742 ((*itr)->GetPosZ() == a_PosZ) &&
1743 (
1744 ((*itr)->GetBlockType() == E_BLOCK_WALLSIGN) ||
1745 ((*itr)->GetBlockType() == E_BLOCK_SIGN_POST)
1746 )
1747 )
1748 {
1749 MarkDirty();
1750 (reinterpret_cast<cSignEntity *>(*itr))->SetLines(a_Line1, a_Line2, a_Line3, a_Line4);
1751 m_World->BroadcastBlockEntity(a_PosX, a_PosY, a_PosZ);
1752 return true;
1753 }
1754 } // for itr - m_BlockEntities[]
1755 return false;
1756}
1757
1758
1759

Callers

nothing calls this directly

Calls 8

beginMethod · 0.80
endMethod · 0.80
SetLinesMethod · 0.80
GetPosXMethod · 0.45
GetPosYMethod · 0.45
GetPosZMethod · 0.45
GetBlockTypeMethod · 0.45
BroadcastBlockEntityMethod · 0.45

Tested by

no test coverage detected