mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-25 20:16:00 +01:00
Revert "Fix loading some chunk formats in 1.12. Fixes #33"
This reverts commit 1ddc229047
.
This commit is contained in:
parent
d172d0f27d
commit
24c50c27c6
@ -31,11 +31,8 @@
|
|||||||
import de.bluecolored.bluemap.core.world.Biome;
|
import de.bluecolored.bluemap.core.world.Biome;
|
||||||
import de.bluecolored.bluemap.core.world.BlockState;
|
import de.bluecolored.bluemap.core.world.BlockState;
|
||||||
import de.bluecolored.bluemap.core.world.LightData;
|
import de.bluecolored.bluemap.core.world.LightData;
|
||||||
import net.querz.nbt.ByteArrayTag;
|
|
||||||
import net.querz.nbt.CompoundTag;
|
import net.querz.nbt.CompoundTag;
|
||||||
import net.querz.nbt.IntArrayTag;
|
|
||||||
import net.querz.nbt.ListTag;
|
import net.querz.nbt.ListTag;
|
||||||
import net.querz.nbt.Tag;
|
|
||||||
import net.querz.nbt.mca.MCAUtil;
|
import net.querz.nbt.mca.MCAUtil;
|
||||||
|
|
||||||
public class ChunkAnvil112 extends Chunk {
|
public class ChunkAnvil112 extends Chunk {
|
||||||
@ -44,7 +41,7 @@ public class ChunkAnvil112 extends Chunk {
|
|||||||
|
|
||||||
private boolean isGenerated;
|
private boolean isGenerated;
|
||||||
private Section[] sections;
|
private Section[] sections;
|
||||||
private int[] biomes;
|
private byte[] biomes;
|
||||||
|
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
public ChunkAnvil112(MCAWorld world, CompoundTag chunkTag) {
|
public ChunkAnvil112(MCAWorld world, CompoundTag chunkTag) {
|
||||||
@ -65,21 +62,10 @@ public ChunkAnvil112(MCAWorld world, CompoundTag chunkTag) {
|
|||||||
sections[section.getSectionY()] = section;
|
sections[section.getSectionY()] = section;
|
||||||
}
|
}
|
||||||
|
|
||||||
Tag<?> tag = levelData.get("Biomes"); //tag can be byte-array or int-array
|
biomes = levelData.getByteArray("Biomes");
|
||||||
if (tag instanceof ByteArrayTag) {
|
|
||||||
byte[] bs = ((ByteArrayTag) tag).getValue();
|
|
||||||
biomes = new int[bs.length];
|
|
||||||
|
|
||||||
for (int i = 0; i < bs.length; i++) {
|
|
||||||
biomes[i] = bs[i] & 0xFF;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (tag instanceof IntArrayTag) {
|
|
||||||
biomes = ((IntArrayTag) tag).getValue();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (biomes == null || biomes.length == 0) {
|
if (biomes == null || biomes.length == 0) {
|
||||||
biomes = new int[2048];
|
biomes = new byte[2048];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user