refactor(Minecraft.World): Implement LCEMP changes.
This commit is contained in:
@@ -27,13 +27,15 @@ ComplexItemDataPacket::ComplexItemDataPacket(short itemType, short itemId, charA
|
||||
memcpy(this->data.data, data.data, data.length);
|
||||
}
|
||||
|
||||
void ComplexItemDataPacket::read(DataInputStream *dis) //throws IOException
|
||||
{
|
||||
itemType = dis->readShort();
|
||||
itemId = dis->readShort();
|
||||
|
||||
data = charArray(dis->readUnsignedShort() & 0xffff);
|
||||
dis->readFully(data);
|
||||
void ComplexItemDataPacket::read(DataInputStream *dis) //throws IOException
|
||||
{
|
||||
itemType = dis->readShort();
|
||||
itemId = dis->readShort();
|
||||
|
||||
int dataLength = dis->readShort() & 0xffff;
|
||||
if(dataLength > 32767) dataLength = 0;
|
||||
data = charArray(dataLength);
|
||||
dis->readFully(data);
|
||||
}
|
||||
|
||||
void ComplexItemDataPacket::write(DataOutputStream *dos) //throws IOException
|
||||
|
||||
Reference in New Issue
Block a user