diff options
author | Ash <ash@heyquark.com> | 2024-11-03 16:33:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-03 16:33:40 +0100 |
commit | d82a6afd9e8be53d60043c8ab49223ac9470ad46 (patch) | |
tree | 6ef640f49754abdde3b541b2e756feffa3ccab05 /Tools | |
parent | Make biomal composition gen respect the shapegen when placing bedrock (#5579) (diff) | |
download | cuberite-d82a6afd9e8be53d60043c8ab49223ac9470ad46.tar cuberite-d82a6afd9e8be53d60043c8ab49223ac9470ad46.tar.gz cuberite-d82a6afd9e8be53d60043c8ab49223ac9470ad46.tar.bz2 cuberite-d82a6afd9e8be53d60043c8ab49223ac9470ad46.tar.lz cuberite-d82a6afd9e8be53d60043c8ab49223ac9470ad46.tar.xz cuberite-d82a6afd9e8be53d60043c8ab49223ac9470ad46.tar.zst cuberite-d82a6afd9e8be53d60043c8ab49223ac9470ad46.zip |
Diffstat (limited to 'Tools')
-rw-r--r-- | Tools/QtBiomeVisualiser/ChunkSource.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Tools/QtBiomeVisualiser/ChunkSource.cpp b/Tools/QtBiomeVisualiser/ChunkSource.cpp index ea3346f04..120b72474 100644 --- a/Tools/QtBiomeVisualiser/ChunkSource.cpp +++ b/Tools/QtBiomeVisualiser/ChunkSource.cpp @@ -5,6 +5,7 @@ #include "src/StringCompression.h" #include "src/WorldStorage/FastNBT.h" #include "src/IniFile.h" +#include "src/Endianness.h" @@ -143,7 +144,7 @@ public: // Get the real data size: const char * chunkData = m_FileData.data() + chunkOffset * 4096; - UInt32 chunkSize = GetBEInt(chunkData); + UInt32 chunkSize = NetworkBufToHost(chunkData); if ((chunkSize < 2) || (chunkSize / 4096 > numChunkSectors)) { // Bad data, bail out @@ -181,7 +182,7 @@ protected: const char * hdr = m_FileData.data(); for (size_t i = 0; i < ARRAYCOUNT(m_Header); i++) { - m_Header[i] = GetBEInt(hdr + 4 * i); + m_Header[i] = NetworkBufToHost(hdr + 4 * i); } m_IsValid = true; } @@ -241,7 +242,7 @@ void AnvilSource::getChunkBiomes(int a_ChunkX, int a_ChunkZ, Chunk & a_DestChunk const char * beBiomes = nbt.GetData(mcsBiomes); for (size_t i = 0; i < ARRAYCOUNT(biomeMap); i++) { - biomeMap[i] = (EMCSBiome)GetBEInt(beBiomes + 4 * i); + biomeMap[i] = (EMCSBiome)NetworkBufToHost<Int32>(beBiomes + 4 * i); } a_DestChunk.setBiomes(biomeMap); return; |