I'm a bit confused.
I put this code into cChunkMap.cpp
and output looks like this:
0x7f0cc00f7d50
removing std::endl made it looks like this:
0x260ae080x260ae200x260ae980x260b1080x260b1200x260b1980x260b3900x260b3a80x260b4080x260b4200x260b4380x260b4800x260b4980x260b5b80x260b5d00x260b5e80x260b6000x260b6180x260b6300x260b6480x260b6600x260b6780x260b6900x260b6a80x260b6c00x260b6d80x260b6f00x260b7080x260b7200x260b7380x260b7500x260b7680x260b7800x260b7980x260b7e00x260b8b80x260b8d00x260b8e80x260b9000x260b9180x260b9300x260b9480x260b9600x260b9780x260b9900x260b9a80x260b9c00x260b9d80x260b9f00x260ba080x260ba200x260ba380x260ba500x260ba680x260ba800x260ba980x260bab00x260bac80x260bae00x260baf80x260bbb80x260bbd00x260bbe80x260bc000x260bc180x260bc300x260bc480x260bc600x260bc780x260bc900x260bca80x260bcc00x260bcd80x260bcf00x260bd080x260bd200x260bd380x260bd500x260bd680x260bd800x260bd980x260bde00x260bdf80x260beb80x260bed00x260bee80x260bf000x260bf180x260bf300x260bf480x260bf600x260bf780x260bf900x260bfa80x260bfc00x260bfd80x260bff00x260c0080x260c0200x260c0380x260c0500x260c0680x260c0800x260c0980x260c0e00x260c0f80x260c1b80x260c1d00x260c1e80x260c2000x260c2180x260c2300x260c2480x260c2600x260c2780x260c2900x260c2a80x260c2c00x260c2d80x260c2f00x260c3080x260c3200x260c3380x260c3500x260c3680x260c3800x260c3980x260c3c80x260c3e00x260c3f80x260c4b80x260c4d00x260c4e80x260c5000x260c5180x260c5300x260c5480x260c5600x260c5780x260c5900x260c5a80x260c5c00x260c5d80x260c5f00x260c6080x260c6200x260c6380x260c6500x260c6680x260c6800x260c6980x260c6b00x260c6c80x260c6e00x260c6f80x260c7b80x260c7d00x260c7e80x260c8000x260c8180x260c8300x260c8480x260c8600x260c8780x260c8900x260c8a80x260c8c00x260c8d80x260c8f00x260c9080x260c9200x260c9380x260c9500x260c9680x260c9800x260c9980x260c9b00x260cab80x260cad00x260cae80x260cb000x260cb180x260cb300x260cb480x260cb600x260cb780x260cb900x260cba80x260cbc00x260cbd80x260cbf00x260cc080x260cc200x260cc380x260cc500x260cc680x260cc800x260cc980x260ccb00x260cdb80x260cdd00x260cde80x260ce000x260ce180x260ce300x260ce480x260ce600x260ce780x260ce900x260cea80x260cec00x260ced80x260cef00x260cf080x260cf200x260cf380x260cf500x260cf680x260cf800x260cf980x260d0b80x260d0d00x260d0e80x260d1000x260d1180x260d1300x260d1480x260d1600x260d1780x260d1900x260d1a80x260d1c00x260d1d80x260d1f00x260d2080x260d2200x260d2380x260d2500x260d2680x260d2800x260d2980x260d3b80x260d3d00x260d3e80x260d4000x260d4180x260d4300x260d4480x260d4600x260d4780x260d4900x260d4a80x260d4c00x260d4d80x260d4f00x260d5080x260d5200x260d5380x260d5500x260d5680x260d5800x260d5980x260d6b80x260d6d00x260d6e80x260d7000x260d7180x260d7300x260d7480x260d7600x260d7780x260d7900x260d7a80x260d7c00x260d7d80x260d7f00x260d8080x260d8200x260d8380x260d8500x260d8680x260d8800x260d8980x260d9b80x260d9d00x260d9e80x260da000x260da180x260da300x260da480x260da600x260da780x260da900x260daa80x260dac00x260dad80x260daf00x260db080x260db200x260db380x260db500x260db680x260db800x260db980x260dcd00x260dce80x260dd000x260dd180x260dd300x260dd480x260dd600x260dd780x260dd900x260dda80x260ddc00x260ddd80x260ddf00x260de080x260e0180x260e0300x260e0480x260e0600x260e0780x260e0a80x260e0c00x260e0d80x260e3000x260e3180x260e3300x260e3480x260e3600x260e378
Anyway is the compressed chunk data minus the json the same as the compressed chunk data minus the nbt?
So if I ignored the json and converted mcr to pak using only the compressed data, would I get something without entities that MCServer could read? for a start at least.
I put this code into cChunkMap.cpp
Code:
for( short i = 0; i < NumChunks; ++i )
{
int ChunkX = 0;
int ChunkZ = 0;
if( fread( &ChunkX, sizeof(ChunkX), 1, f) != 1 ) { LOGERROR("ERROR READING FROM FILE %s", SourceFile); fclose(f); return false; }
if( fread( &ChunkZ, sizeof(ChunkZ), 1, f) != 1 ) { LOGERROR("ERROR READING FROM FILE %s", SourceFile); fclose(f); return false; }
cChunkData* Data = Layer->GetChunk( ChunkX, ChunkZ );
if( Data )
{
if( fread( &Data->m_CompressedSize, sizeof(Data->m_CompressedSize), 1, f) != 1 ) { LOGERROR("ERROR READING FROM FILE %s", So$
if( fread( &Data->m_UncompressedSize, sizeof(Data->m_UncompressedSize), 1, f) != 1 ) { LOGERROR("ERROR READING FROM FILE %s"$
}
else
{
LOGERROR("Chunk with wrong coordinates in pak file! %i %i", ChunkX, ChunkZ );
fclose(f);
return 0;
}
OrderedData[i] = Data;
std::cout << Data << std::endl;
}
and output looks like this:
0x7f0cc00f7d50
removing std::endl made it looks like this:
0x260ae080x260ae200x260ae980x260b1080x260b1200x260b1980x260b3900x260b3a80x260b4080x260b4200x260b4380x260b4800x260b4980x260b5b80x260b5d00x260b5e80x260b6000x260b6180x260b6300x260b6480x260b6600x260b6780x260b6900x260b6a80x260b6c00x260b6d80x260b6f00x260b7080x260b7200x260b7380x260b7500x260b7680x260b7800x260b7980x260b7e00x260b8b80x260b8d00x260b8e80x260b9000x260b9180x260b9300x260b9480x260b9600x260b9780x260b9900x260b9a80x260b9c00x260b9d80x260b9f00x260ba080x260ba200x260ba380x260ba500x260ba680x260ba800x260ba980x260bab00x260bac80x260bae00x260baf80x260bbb80x260bbd00x260bbe80x260bc000x260bc180x260bc300x260bc480x260bc600x260bc780x260bc900x260bca80x260bcc00x260bcd80x260bcf00x260bd080x260bd200x260bd380x260bd500x260bd680x260bd800x260bd980x260bde00x260bdf80x260beb80x260bed00x260bee80x260bf000x260bf180x260bf300x260bf480x260bf600x260bf780x260bf900x260bfa80x260bfc00x260bfd80x260bff00x260c0080x260c0200x260c0380x260c0500x260c0680x260c0800x260c0980x260c0e00x260c0f80x260c1b80x260c1d00x260c1e80x260c2000x260c2180x260c2300x260c2480x260c2600x260c2780x260c2900x260c2a80x260c2c00x260c2d80x260c2f00x260c3080x260c3200x260c3380x260c3500x260c3680x260c3800x260c3980x260c3c80x260c3e00x260c3f80x260c4b80x260c4d00x260c4e80x260c5000x260c5180x260c5300x260c5480x260c5600x260c5780x260c5900x260c5a80x260c5c00x260c5d80x260c5f00x260c6080x260c6200x260c6380x260c6500x260c6680x260c6800x260c6980x260c6b00x260c6c80x260c6e00x260c6f80x260c7b80x260c7d00x260c7e80x260c8000x260c8180x260c8300x260c8480x260c8600x260c8780x260c8900x260c8a80x260c8c00x260c8d80x260c8f00x260c9080x260c9200x260c9380x260c9500x260c9680x260c9800x260c9980x260c9b00x260cab80x260cad00x260cae80x260cb000x260cb180x260cb300x260cb480x260cb600x260cb780x260cb900x260cba80x260cbc00x260cbd80x260cbf00x260cc080x260cc200x260cc380x260cc500x260cc680x260cc800x260cc980x260ccb00x260cdb80x260cdd00x260cde80x260ce000x260ce180x260ce300x260ce480x260ce600x260ce780x260ce900x260cea80x260cec00x260ced80x260cef00x260cf080x260cf200x260cf380x260cf500x260cf680x260cf800x260cf980x260d0b80x260d0d00x260d0e80x260d1000x260d1180x260d1300x260d1480x260d1600x260d1780x260d1900x260d1a80x260d1c00x260d1d80x260d1f00x260d2080x260d2200x260d2380x260d2500x260d2680x260d2800x260d2980x260d3b80x260d3d00x260d3e80x260d4000x260d4180x260d4300x260d4480x260d4600x260d4780x260d4900x260d4a80x260d4c00x260d4d80x260d4f00x260d5080x260d5200x260d5380x260d5500x260d5680x260d5800x260d5980x260d6b80x260d6d00x260d6e80x260d7000x260d7180x260d7300x260d7480x260d7600x260d7780x260d7900x260d7a80x260d7c00x260d7d80x260d7f00x260d8080x260d8200x260d8380x260d8500x260d8680x260d8800x260d8980x260d9b80x260d9d00x260d9e80x260da000x260da180x260da300x260da480x260da600x260da780x260da900x260daa80x260dac00x260dad80x260daf00x260db080x260db200x260db380x260db500x260db680x260db800x260db980x260dcd00x260dce80x260dd000x260dd180x260dd300x260dd480x260dd600x260dd780x260dd900x260dda80x260ddc00x260ddd80x260ddf00x260de080x260e0180x260e0300x260e0480x260e0600x260e0780x260e0a80x260e0c00x260e0d80x260e3000x260e3180x260e3300x260e3480x260e3600x260e378
Anyway is the compressed chunk data minus the json the same as the compressed chunk data minus the nbt?
So if I ignored the json and converted mcr to pak using only the compressed data, would I get something without entities that MCServer could read? for a start at least.