Skip to content

Commit ad4ae53

Browse files
committed
Fix render-issue if section it fully made of air
1 parent faa6965 commit ad4ae53

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/ChunkAnvil118.java

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,6 @@ public ChunkAnvil118(MCAWorld world, CompoundTag chunkTag) {
6666

6767
for (CompoundTag sectionTag : sectionsTag) {
6868

69-
// skip empty sections
70-
CompoundTag blockStatesTag = sectionTag.getCompoundTag("block_states");
71-
if (blockStatesTag == null) continue;
72-
ListTag<CompoundTag> paletteTag = (ListTag<CompoundTag>) blockStatesTag.getListTag("palette");
73-
if (paletteTag == null) continue;
74-
if (paletteTag.size() == 0) continue;
75-
if (paletteTag.size() == 1 && BlockState.AIR.getFormatted().equals(paletteTag.get(0).getString("Name"))) continue;
76-
7769
Section section = new Section(sectionTag);
7870
int y = section.getSectionY();
7971

BlueMapCore/src/main/java/de/bluecolored/bluemap/core/mca/MCARegion.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public MCAChunk loadChunk(int chunkX, int chunkZ, boolean ignoreMissingLightData
6262

6363
int xzChunk = Math.floorMod(chunkZ, 32) * 32 + Math.floorMod(chunkX, 32);
6464

65-
raf.seek(xzChunk * 4);
65+
raf.seek(xzChunk * 4L);
6666
int offset = raf.read() << 16;
6767
offset |= (raf.read() & 0xFF) << 8;
6868
offset |= raf.read() & 0xFF;
@@ -125,7 +125,7 @@ public Collection<Vector2i> listChunks(long modifiedSince) {
125125
}
126126
}
127127
} catch (RuntimeException | IOException ex) {
128-
Logger.global.logWarning("Failed to read .mca file: " + regionFile.getAbsolutePath() + " (" + ex.toString() + ")");
128+
Logger.global.logWarning("Failed to read .mca file: " + regionFile.getAbsolutePath() + " (" + ex + ")");
129129
}
130130

131131
return chunks;

0 commit comments

Comments
 (0)