mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-22 02:26:00 +01:00
Actually fix NPE when loading chunks sometimes
This commit is contained in:
parent
0d36a0f70b
commit
5bb7a77fb9
@ -38,9 +38,6 @@
|
||||
|
||||
public class Chunk_1_13 extends MCAChunk {
|
||||
|
||||
private static final Level EMPTY_LEVEL = new Level();
|
||||
private static final HeightmapsData EMPTY_HEIGHTMAPS_DATA = new HeightmapsData();
|
||||
|
||||
private static final Key STATUS_EMPTY = new Key("minecraft", "empty");
|
||||
private static final Key STATUS_FULL = new Key("minecraft", "full");
|
||||
private static final Key STATUS_FULLCHUNK = new Key("minecraft", "fullchunk");
|
||||
@ -265,7 +262,7 @@ public int getSectionY() {
|
||||
@Getter
|
||||
@SuppressWarnings("FieldMayBeFinal")
|
||||
public static class Data extends MCAChunk.Data {
|
||||
private Level level = EMPTY_LEVEL;
|
||||
private Level level = new Level();
|
||||
}
|
||||
|
||||
@Getter
|
||||
@ -273,7 +270,7 @@ public static class Data extends MCAChunk.Data {
|
||||
public static class Level {
|
||||
private Key status = STATUS_EMPTY;
|
||||
private long inhabitedTime = 0;
|
||||
private HeightmapsData heightmaps = EMPTY_HEIGHTMAPS_DATA;
|
||||
private HeightmapsData heightmaps = new HeightmapsData();
|
||||
private SectionData @Nullable [] sections = null;
|
||||
private int[] biomes = EMPTY_INT_ARRAY;
|
||||
}
|
||||
|
@ -39,9 +39,6 @@
|
||||
|
||||
public class Chunk_1_16 extends MCAChunk {
|
||||
|
||||
private static final Level EMPTY_LEVEL = new Level();
|
||||
private static final HeightmapsData EMPTY_HEIGHTMAPS_DATA = new HeightmapsData();
|
||||
|
||||
private static final Key STATUS_EMPTY = new Key("minecraft", "empty");
|
||||
private static final Key STATUS_FULL = new Key("minecraft", "full");
|
||||
|
||||
@ -253,7 +250,7 @@ public int getSectionY() {
|
||||
@Getter
|
||||
@SuppressWarnings("FieldMayBeFinal")
|
||||
public static class Data extends MCAChunk.Data {
|
||||
private Level level = EMPTY_LEVEL;
|
||||
private Level level = new Level();
|
||||
}
|
||||
|
||||
@Getter
|
||||
@ -261,7 +258,7 @@ public static class Data extends MCAChunk.Data {
|
||||
public static class Level {
|
||||
private Key status = STATUS_EMPTY;
|
||||
private long inhabitedTime = 0;
|
||||
private HeightmapsData heightmaps = EMPTY_HEIGHTMAPS_DATA;
|
||||
private HeightmapsData heightmaps = new HeightmapsData();
|
||||
private SectionData @Nullable [] sections = null;
|
||||
private int[] biomes = EMPTY_INT_ARRAY;
|
||||
}
|
||||
|
@ -39,10 +39,6 @@
|
||||
|
||||
public class Chunk_1_18 extends MCAChunk {
|
||||
|
||||
private static final BlockStatesData EMPTY_BLOCKSTATESDATA = new BlockStatesData();
|
||||
private static final BiomesData EMPTY_BIOMESDATA = new BiomesData();
|
||||
private static final HeightmapsData EMPTY_HEIGHTMAPS_DATA = new HeightmapsData();
|
||||
|
||||
private static final Key STATUS_EMPTY = new Key("minecraft", "empty");
|
||||
private static final Key STATUS_FULL = new Key("minecraft", "full");
|
||||
|
||||
@ -265,7 +261,7 @@ public int getSectionY() {
|
||||
public static class Data extends MCAChunk.Data {
|
||||
private Key status = STATUS_EMPTY;
|
||||
private long inhabitedTime = 0;
|
||||
private HeightmapsData heightmaps = EMPTY_HEIGHTMAPS_DATA;
|
||||
private HeightmapsData heightmaps = new HeightmapsData();
|
||||
private SectionData @Nullable [] sections = null;
|
||||
}
|
||||
|
||||
@ -282,8 +278,8 @@ public static class SectionData {
|
||||
private int y = 0;
|
||||
private byte[] blockLight = EMPTY_BYTE_ARRAY;
|
||||
private byte[] skyLight = EMPTY_BYTE_ARRAY;
|
||||
@NBTName("block_states") private BlockStatesData blockStates = EMPTY_BLOCKSTATESDATA;
|
||||
private BiomesData biomes = EMPTY_BIOMESDATA;
|
||||
@NBTName("block_states") private BlockStatesData blockStates = new BlockStatesData();
|
||||
private BiomesData biomes = new BiomesData();
|
||||
}
|
||||
|
||||
@Getter
|
||||
|
Loading…
Reference in New Issue
Block a user