|
|
@ -10,19 +10,20 @@ public class Packet57ExtraChunk extends Packet {
|
|
|
|
|
|
|
|
|
|
|
|
private byte[] blockLSB, blockMSB, metadata, skyLight, blockLight;
|
|
|
|
private byte[] blockLSB, blockMSB, metadata, skyLight, blockLight;
|
|
|
|
private BigInteger x, z;
|
|
|
|
private BigInteger x, z;
|
|
|
|
private int y;
|
|
|
|
private int y, blockRefCnt;
|
|
|
|
|
|
|
|
|
|
|
|
public Packet57ExtraChunk() {}
|
|
|
|
public Packet57ExtraChunk() {}
|
|
|
|
|
|
|
|
|
|
|
|
public Packet57ExtraChunk(BigInteger x, int y, BigInteger z, ExtendedBlockStorage storage) {
|
|
|
|
public Packet57ExtraChunk(BigInteger x, int y, BigInteger z, ExtendedBlockStorage storage) {
|
|
|
|
this.x = x;
|
|
|
|
this.x = x;
|
|
|
|
this.y = y;
|
|
|
|
this.y = y;
|
|
|
|
this.z = z;
|
|
|
|
this.z = z;
|
|
|
|
this.blockLSB = storage.getBlockLSBArray();
|
|
|
|
this.blockLSB = storage.getBlockLSBArray();
|
|
|
|
this.blockMSB = storage.getBlockMSBArray().data;
|
|
|
|
this.blockMSB = storage.getBlockMSBArray().data;
|
|
|
|
this.metadata = storage.getMetadataArray().data;
|
|
|
|
this.metadata = storage.getMetadataArray().data;
|
|
|
|
this.skyLight = storage.getSkylightArray().data;
|
|
|
|
this.skyLight = storage.getSkylightArray().data;
|
|
|
|
this.blockLight = storage.getBlocklightArray().data;
|
|
|
|
this.blockLight = storage.getBlocklightArray().data;
|
|
|
|
|
|
|
|
this.blockRefCnt = storage.getBlockRefCnt();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -30,11 +31,12 @@ public class Packet57ExtraChunk extends Packet {
|
|
|
|
this.x = readBigInteger(var1);
|
|
|
|
this.x = readBigInteger(var1);
|
|
|
|
this.y = var1.readInt();
|
|
|
|
this.y = var1.readInt();
|
|
|
|
this.z = readBigInteger(var1);
|
|
|
|
this.z = readBigInteger(var1);
|
|
|
|
this.blockLSB = readBytesFromStream(var1);
|
|
|
|
this.blockLSB = readBytesFromStream(var1);
|
|
|
|
this.blockMSB = readBytesFromStream(var1);
|
|
|
|
this.blockMSB = readBytesFromStream(var1);
|
|
|
|
this.metadata = readBytesFromStream(var1);
|
|
|
|
this.metadata = readBytesFromStream(var1);
|
|
|
|
this.skyLight = readBytesFromStream(var1);
|
|
|
|
this.skyLight = readBytesFromStream(var1);
|
|
|
|
this.blockLight = readBytesFromStream(var1);
|
|
|
|
this.blockLight = readBytesFromStream(var1);
|
|
|
|
|
|
|
|
this.blockRefCnt = var1.readInt();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -42,11 +44,12 @@ public class Packet57ExtraChunk extends Packet {
|
|
|
|
writeBigInteger(var1, this.x);
|
|
|
|
writeBigInteger(var1, this.x);
|
|
|
|
var1.writeInt(this.y);
|
|
|
|
var1.writeInt(this.y);
|
|
|
|
writeBigInteger(var1, this.z);
|
|
|
|
writeBigInteger(var1, this.z);
|
|
|
|
writeByteArray(var1, blockLSB);
|
|
|
|
writeByteArray(var1, this.blockLSB);
|
|
|
|
writeByteArray(var1, blockMSB);
|
|
|
|
writeByteArray(var1, this.blockMSB);
|
|
|
|
writeByteArray(var1, metadata);
|
|
|
|
writeByteArray(var1, this.metadata);
|
|
|
|
writeByteArray(var1, skyLight);
|
|
|
|
writeByteArray(var1, this.skyLight);
|
|
|
|
writeByteArray(var1, blockLight);
|
|
|
|
writeByteArray(var1, this.blockLight);
|
|
|
|
|
|
|
|
var1.writeInt(blockRefCnt);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -90,5 +93,9 @@ public class Packet57ExtraChunk extends Packet {
|
|
|
|
public int getY() {
|
|
|
|
public int getY() {
|
|
|
|
return y;
|
|
|
|
return y;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public int getBlockRefCnt() {
|
|
|
|
|
|
|
|
return blockRefCnt;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|