summaryrefslogtreecommitdiffstats
path: root/Tools/QtBiomeVisualiser
diff options
context:
space:
mode:
authorAlexander Harkness <me@bearbin.net>2024-11-04 23:28:57 +0100
committerAlexander Harkness <me@bearbin.net>2024-11-04 23:28:57 +0100
commit09ab9dba1b46f1731276d3fd818293590e3e6e59 (patch)
tree06613303f5500224b04cc68cfb05cebd96d9cabe /Tools/QtBiomeVisualiser
parentCount non-air blocks and use the real count not 4096. (diff)
parentTemp fix for disappearing chunk sections in 1.14 (#5560) (diff)
downloadcuberite-09ab9dba1b46f1731276d3fd818293590e3e6e59.tar
cuberite-09ab9dba1b46f1731276d3fd818293590e3e6e59.tar.gz
cuberite-09ab9dba1b46f1731276d3fd818293590e3e6e59.tar.bz2
cuberite-09ab9dba1b46f1731276d3fd818293590e3e6e59.tar.lz
cuberite-09ab9dba1b46f1731276d3fd818293590e3e6e59.tar.xz
cuberite-09ab9dba1b46f1731276d3fd818293590e3e6e59.tar.zst
cuberite-09ab9dba1b46f1731276d3fd818293590e3e6e59.zip
Diffstat (limited to '')
-rw-r--r--Tools/QtBiomeVisualiser/ChunkSource.cpp7
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;