mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2025-05-14 07:10:24 -04:00
packet 0x64 (OpenWindow): support for the optional entityId field
This commit is contained in:
parent
1ac3e12099
commit
058d6eb12e
1 changed files with 9 additions and 0 deletions
|
@ -1348,6 +1348,15 @@ function parsePacket(buffer, isServer) {
|
|||
results[fieldInfo.name] = readResults.value;
|
||||
size += readResults.size;
|
||||
}
|
||||
if (packetId === 0x64 && results["inventoryType"] === 11) {
|
||||
read = types["int"][0];
|
||||
readResults = read(buffer, size);
|
||||
if (! readResults) return null; // buffer needs to be more full
|
||||
if (readResults.error) return { error: readResults.error };
|
||||
|
||||
results["entityId"] = readResults.value;
|
||||
size += readResults.size;
|
||||
}
|
||||
debug(results);
|
||||
return {
|
||||
size: size,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue