mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-09-26 14:22:53 +02:00
Fix render-issue if section it fully made of air
This commit is contained in:
parent
faa6965df3
commit
ad4ae53672
@ -66,14 +66,6 @@ public ChunkAnvil118(MCAWorld world, CompoundTag chunkTag) {
|
|||||||
|
|
||||||
for (CompoundTag sectionTag : sectionsTag) {
|
for (CompoundTag sectionTag : sectionsTag) {
|
||||||
|
|
||||||
// skip empty sections
|
|
||||||
CompoundTag blockStatesTag = sectionTag.getCompoundTag("block_states");
|
|
||||||
if (blockStatesTag == null) continue;
|
|
||||||
ListTag<CompoundTag> paletteTag = (ListTag<CompoundTag>) blockStatesTag.getListTag("palette");
|
|
||||||
if (paletteTag == null) continue;
|
|
||||||
if (paletteTag.size() == 0) continue;
|
|
||||||
if (paletteTag.size() == 1 && BlockState.AIR.getFormatted().equals(paletteTag.get(0).getString("Name"))) continue;
|
|
||||||
|
|
||||||
Section section = new Section(sectionTag);
|
Section section = new Section(sectionTag);
|
||||||
int y = section.getSectionY();
|
int y = section.getSectionY();
|
||||||
|
|
||||||
|
@ -62,7 +62,7 @@ public MCAChunk loadChunk(int chunkX, int chunkZ, boolean ignoreMissingLightData
|
|||||||
|
|
||||||
int xzChunk = Math.floorMod(chunkZ, 32) * 32 + Math.floorMod(chunkX, 32);
|
int xzChunk = Math.floorMod(chunkZ, 32) * 32 + Math.floorMod(chunkX, 32);
|
||||||
|
|
||||||
raf.seek(xzChunk * 4);
|
raf.seek(xzChunk * 4L);
|
||||||
int offset = raf.read() << 16;
|
int offset = raf.read() << 16;
|
||||||
offset |= (raf.read() & 0xFF) << 8;
|
offset |= (raf.read() & 0xFF) << 8;
|
||||||
offset |= raf.read() & 0xFF;
|
offset |= raf.read() & 0xFF;
|
||||||
@ -125,7 +125,7 @@ public Collection<Vector2i> listChunks(long modifiedSince) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (RuntimeException | IOException ex) {
|
} catch (RuntimeException | IOException ex) {
|
||||||
Logger.global.logWarning("Failed to read .mca file: " + regionFile.getAbsolutePath() + " (" + ex.toString() + ")");
|
Logger.global.logWarning("Failed to read .mca file: " + regionFile.getAbsolutePath() + " (" + ex + ")");
|
||||||
}
|
}
|
||||||
|
|
||||||
return chunks;
|
return chunks;
|
||||||
|
Loading…
Reference in New Issue
Block a user