добавлена возможность указывать произвольные слои блоков
This commit is contained in:
@@ -102,6 +102,7 @@ public class ChunkDataPacket implements SCPacket {
|
||||
netStream.writeInt(z); // Chunk Y
|
||||
netStream.writeBoolean(initChunk); // Init Chunk
|
||||
|
||||
int maxH = 0;
|
||||
if (sectionList == null && chunk != null) {
|
||||
int bitMask = 0;
|
||||
for (int h = 15; h >= 0; h--) {
|
||||
@@ -109,6 +110,7 @@ public class ChunkDataPacket implements SCPacket {
|
||||
ChunkSection chunkSection = chunk.getChunkSection(h);
|
||||
if (chunkSection != null && chunkSection.getY() == h) {
|
||||
bitMask |= 0x01;
|
||||
maxH++;
|
||||
} else {
|
||||
bitMask |= 0x00;
|
||||
}
|
||||
@@ -123,6 +125,7 @@ public class ChunkDataPacket implements SCPacket {
|
||||
ChunkSection chunkSection = sectionList.get(i);
|
||||
if (chunkSection != null && chunkSection.getY() == h) {
|
||||
bitMask |= 0x01;
|
||||
maxH++;
|
||||
} else {
|
||||
bitMask |= 0x00;
|
||||
}
|
||||
@@ -138,7 +141,7 @@ public class ChunkDataPacket implements SCPacket {
|
||||
int dataItems = 0;
|
||||
final int airBlockPalette = serializeBlockState(BlockType.AIR);
|
||||
|
||||
for (int h = 0; h < 16; h++) {
|
||||
for (int h = 0; h < maxH; h++) {
|
||||
ChunkSection chunkSection = null;
|
||||
|
||||
if (chunk != null) {
|
||||
|
||||
Reference in New Issue
Block a user