mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2024-11-14 19:04:59 -05:00
update protodef
This commit is contained in:
parent
ba2d791d75
commit
836b36640a
2 changed files with 3 additions and 4 deletions
|
@ -45,7 +45,7 @@
|
|||
"buffer-equal": "1.0.0",
|
||||
"minecraft-data": "^1.0.3",
|
||||
"prismarine-nbt": "0.2.1",
|
||||
"protodef": "^1.0.1",
|
||||
"protodef": "^1.1.1",
|
||||
"readable-stream": "^2.0.5",
|
||||
"ursa-purejs": "0.0.3",
|
||||
"uuid-1345": "^0.99.6",
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
const [readVarInt, writeVarInt, sizeOfVarInt] = require("protodef").types.varint;
|
||||
const {PartialReadError} = require("protodef").utils;
|
||||
const Transform = require("readable-stream").Transform;
|
||||
|
||||
module.exports.createSplitter = function() {
|
||||
|
@ -54,7 +53,7 @@ class Splitter extends Transform {
|
|||
({ value, size, error } = readVarInt(this.buffer, offset));
|
||||
}
|
||||
catch(e) {
|
||||
if(!(e instanceof PartialReadError)) {
|
||||
if(!(e.partialReadError)) {
|
||||
throw e;
|
||||
}
|
||||
else
|
||||
|
@ -68,7 +67,7 @@ class Splitter extends Transform {
|
|||
({value, size, error} = readVarInt(this.buffer, offset));
|
||||
}
|
||||
catch(e) {
|
||||
if(e instanceof PartialReadError) {
|
||||
if(e.partialReadError) {
|
||||
break;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue