forked from mirror/BlueMap
Allow reading chunk-sections that have an integer y tag instead of a byte
This commit is contained in:
parent
9a22424241
commit
e071ed83fa
@ -35,6 +35,7 @@
|
||||
import de.bluecolored.bluemap.core.world.LightData;
|
||||
import net.querz.nbt.CompoundTag;
|
||||
import net.querz.nbt.ListTag;
|
||||
import net.querz.nbt.NumberTag;
|
||||
import net.querz.nbt.mca.MCAUtil;
|
||||
|
||||
public class ChunkAnvil112 extends Chunk {
|
||||
@ -134,7 +135,7 @@ private class Section {
|
||||
private byte[] data;
|
||||
|
||||
public Section(CompoundTag sectionData) {
|
||||
this.sectionY = sectionData.getByte("Y");
|
||||
this.sectionY = sectionData.get("Y", NumberTag.class).asInt();
|
||||
this.blocks = sectionData.getByteArray("Blocks");
|
||||
this.add = sectionData.getByteArray("Add");
|
||||
this.blockLight = sectionData.getByteArray("BlockLight");
|
||||
|
@ -36,12 +36,7 @@
|
||||
import de.bluecolored.bluemap.core.world.Biome;
|
||||
import de.bluecolored.bluemap.core.world.BlockState;
|
||||
import de.bluecolored.bluemap.core.world.LightData;
|
||||
import net.querz.nbt.ByteArrayTag;
|
||||
import net.querz.nbt.CompoundTag;
|
||||
import net.querz.nbt.IntArrayTag;
|
||||
import net.querz.nbt.ListTag;
|
||||
import net.querz.nbt.StringTag;
|
||||
import net.querz.nbt.Tag;
|
||||
import net.querz.nbt.*;
|
||||
import net.querz.nbt.mca.MCAUtil;
|
||||
|
||||
public class ChunkAnvil113 extends Chunk {
|
||||
@ -147,7 +142,7 @@ private class Section {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Section(CompoundTag sectionData) {
|
||||
this.sectionY = sectionData.getByte("Y");
|
||||
this.sectionY = sectionData.get("Y", NumberTag.class).asInt();
|
||||
this.blockLight = sectionData.getByteArray("BlockLight");
|
||||
this.skyLight = sectionData.getByteArray("SkyLight");
|
||||
this.blocks = sectionData.getLongArray("BlockStates");
|
||||
|
@ -36,12 +36,7 @@
|
||||
import de.bluecolored.bluemap.core.world.Biome;
|
||||
import de.bluecolored.bluemap.core.world.BlockState;
|
||||
import de.bluecolored.bluemap.core.world.LightData;
|
||||
import net.querz.nbt.ByteArrayTag;
|
||||
import net.querz.nbt.CompoundTag;
|
||||
import net.querz.nbt.IntArrayTag;
|
||||
import net.querz.nbt.ListTag;
|
||||
import net.querz.nbt.StringTag;
|
||||
import net.querz.nbt.Tag;
|
||||
import net.querz.nbt.*;
|
||||
import net.querz.nbt.mca.MCAUtil;
|
||||
|
||||
public class ChunkAnvil115 extends Chunk {
|
||||
@ -148,7 +143,7 @@ private class Section {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Section(CompoundTag sectionData) {
|
||||
this.sectionY = sectionData.getByte("Y");
|
||||
this.sectionY = sectionData.get("Y", NumberTag.class).asInt();
|
||||
this.blockLight = sectionData.getByteArray("BlockLight");
|
||||
this.skyLight = sectionData.getByteArray("SkyLight");
|
||||
this.blocks = sectionData.getLongArray("BlockStates");
|
||||
|
@ -36,12 +36,7 @@
|
||||
import de.bluecolored.bluemap.core.world.Biome;
|
||||
import de.bluecolored.bluemap.core.world.BlockState;
|
||||
import de.bluecolored.bluemap.core.world.LightData;
|
||||
import net.querz.nbt.ByteArrayTag;
|
||||
import net.querz.nbt.CompoundTag;
|
||||
import net.querz.nbt.IntArrayTag;
|
||||
import net.querz.nbt.ListTag;
|
||||
import net.querz.nbt.StringTag;
|
||||
import net.querz.nbt.Tag;
|
||||
import net.querz.nbt.*;
|
||||
import net.querz.nbt.mca.MCAUtil;
|
||||
|
||||
public class ChunkAnvil116 extends Chunk {
|
||||
@ -148,7 +143,7 @@ private class Section {
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
public Section(CompoundTag sectionData) {
|
||||
this.sectionY = sectionData.getByte("Y");
|
||||
this.sectionY = sectionData.get("Y", NumberTag.class).asInt();
|
||||
this.blockLight = sectionData.getByteArray("BlockLight");
|
||||
this.skyLight = sectionData.getByteArray("SkyLight");
|
||||
this.blocks = sectionData.getLongArray("BlockStates");
|
||||
|
Loading…
Reference in New Issue
Block a user