Fix render-issue if section it fully made of air
This commit is contained in:
parent
faa6965df3
commit
ad4ae53672
|
@ -66,14 +66,6 @@ public class ChunkAnvil118 extends MCAChunk {
|
|||
|
||||
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);
|
||||
int y = section.getSectionY();
|
||||
|
||||
|
|
|
@ -62,7 +62,7 @@ public class MCARegion implements Region {
|
|||
|
||||
int xzChunk = Math.floorMod(chunkZ, 32) * 32 + Math.floorMod(chunkX, 32);
|
||||
|
||||
raf.seek(xzChunk * 4);
|
||||
raf.seek(xzChunk * 4L);
|
||||
int offset = raf.read() << 16;
|
||||
offset |= (raf.read() & 0xFF) << 8;
|
||||
offset |= raf.read() & 0xFF;
|
||||
|
@ -125,7 +125,7 @@ public class MCARegion implements Region {
|
|||
}
|
||||
}
|
||||
} 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;
|
||||
|
|
Loading…
Reference in New Issue