3131import de .bluecolored .bluemap .core .world .Biome ;
3232import de .bluecolored .bluemap .core .world .BlockState ;
3333import de .bluecolored .bluemap .core .world .LightData ;
34- import net .querz .nbt .ByteArrayTag ;
3534import net .querz .nbt .CompoundTag ;
36- import net .querz .nbt .IntArrayTag ;
3735import net .querz .nbt .ListTag ;
38- import net .querz .nbt .Tag ;
3936import net .querz .nbt .mca .MCAUtil ;
4037
4138public 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