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

Method HandleServerMapChunk

Tools/ProtoProxy/Connection.cpp:1847–1868  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1845
1846
1847bool cConnection::HandleServerMapChunk(void)
1848{
1849 HANDLE_SERVER_PACKET_READ(ReadBEInt, int, ChunkX);
1850 HANDLE_SERVER_PACKET_READ(ReadBEInt, int, ChunkZ);
1851 HANDLE_SERVER_PACKET_READ(ReadChar, char, IsContiguous);
1852 HANDLE_SERVER_PACKET_READ(ReadBEShort, short, PrimaryBitmap);
1853 HANDLE_SERVER_PACKET_READ(ReadBEShort, short, AdditionalBitmap);
1854 HANDLE_SERVER_PACKET_READ(ReadBEInt, int, CompressedSize);
1855 AString CompressedData;
1856 if (!m_ServerBuffer.ReadString(CompressedData, CompressedSize))
1857 {
1858 return false;
1859 }
1860 Log("Received a PACKET_MAP_CHUNK from the server:");
1861 Log(" ChunkPos = [%d, %d]", ChunkX, ChunkZ);
1862 Log(" Compressed size = %d (0x%x)", CompressedSize, CompressedSize);
1863
1864 // TODO: Save the compressed data into a file for later analysis
1865
1866 COPY_TO_CLIENT()
1867 return true;
1868}
1869
1870
1871

Callers

nothing calls this directly

Calls 1

ReadStringMethod · 0.45

Tested by

no test coverage detected