Skip to content

Commit 24c50c2

Browse files
committed
Revert "Fix loading some chunk formats in 1.12. Fixes #33"
This reverts commit 1ddc229.
1 parent d172d0f commit 24c50c2

File tree

1 file changed

+3
-17
lines changed

1 file changed

+3
-17
lines changed

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

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,8 @@
3131
import de.bluecolored.bluemap.core.world.Biome;
3232
import de.bluecolored.bluemap.core.world.BlockState;
3333
import de.bluecolored.bluemap.core.world.LightData;
34-
import net.querz.nbt.ByteArrayTag;
3534
import net.querz.nbt.CompoundTag;
36-
import net.querz.nbt.IntArrayTag;
3735
import net.querz.nbt.ListTag;
38-
import net.querz.nbt.Tag;
3936
import net.querz.nbt.mca.MCAUtil;
4037

4138
public class ChunkAnvil112 extends Chunk {
@@ -44,7 +41,7 @@ public class ChunkAnvil112 extends Chunk {
4441

4542
private boolean isGenerated;
4643
private Section[] sections;
47-
private int[] biomes;
44+
private byte[] biomes;
4845

4946
@SuppressWarnings("unchecked")
5047
public ChunkAnvil112(MCAWorld world, CompoundTag chunkTag) {
@@ -65,21 +62,10 @@ public ChunkAnvil112(MCAWorld world, CompoundTag chunkTag) {
6562
sections[section.getSectionY()] = section;
6663
}
6764

68-
Tag<?> tag = levelData.get("Biomes"); //tag can be byte-array or int-array
69-
if (tag instanceof ByteArrayTag) {
70-
byte[] bs = ((ByteArrayTag) tag).getValue();
71-
biomes = new int[bs.length];
72-
73-
for (int i = 0; i < bs.length; i++) {
74-
biomes[i] = bs[i] & 0xFF;
75-
}
76-
}
77-
else if (tag instanceof IntArrayTag) {
78-
biomes = ((IntArrayTag) tag).getValue();
79-
}
65+
biomes = levelData.getByteArray("Biomes");
8066

8167
if (biomes == null || biomes.length == 0) {
82-
biomes = new int[2048];
68+
biomes = new byte[2048];
8369
}
8470
}
8571

0 commit comments

Comments
 (0)