mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-30 14:41:27 -04:00
properly use protodef nbt inside prismarine-nbt
This commit is contained in:
parent
9a6e7f8f42
commit
c9290e664b
@ -85,18 +85,15 @@ function sizeOfSlot(value) {
|
||||
|
||||
|
||||
function readNbt(buffer, offset) {
|
||||
buffer = buffer.slice(offset);
|
||||
return nbt.parseUncompressed(buffer);
|
||||
return nbt.proto.read(buffer,offset,"nbt");
|
||||
}
|
||||
|
||||
function writeNbt(value, buffer, offset) {
|
||||
var newbuf = nbt.writeUncompressed(value);
|
||||
newbuf.copy(buffer, offset);
|
||||
return offset + newbuf.length;
|
||||
return nbt.proto.write(value,buffer,offset,"nbt");
|
||||
}
|
||||
|
||||
function sizeOfNbt(value) {
|
||||
return nbt.writeUncompressed(value).length;
|
||||
return nbt.proto.sizeOf(value,"nbt");
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user