Fix issue with biomes on chunks, #125

This commit is contained in:
Myles 2016-03-05 22:05:17 +00:00
parent ef6214a442
commit 5582556d8a
1 changed files with 3 additions and 2 deletions

View File

@ -30,7 +30,7 @@ public class NetUtil {
}
}
if(fullChunk) {
if(fullChunk && column.getBiomeData() != null) {
out.writeBytes(column.getBiomeData());
}
@ -103,7 +103,8 @@ public class NetUtil {
}
byte biomeData[] = null;
if(isFullChunk) {
if(isFullChunk && (pos + 256 <= input.length)) {
biomeData = new byte[256];
System.arraycopy(input, pos, biomeData, 0, biomeData.length);
}