Fix zigzag type move in prismarine-nbt (#471)
* Fix rename of zigzag varint type in prismarine-nbt * fix
This commit is contained in:
parent
fd165b8908
commit
7b74cbf712
3 changed files with 6 additions and 6 deletions
|
|
@ -5,7 +5,7 @@ const UUID = require('uuid-1345')
|
|||
const protoLE = nbt.protos.little
|
||||
const protoLEV = nbt.protos.littleVarint
|
||||
// TODO: deal with this:
|
||||
const zigzag = require('prismarine-nbt/compiler-zigzag')
|
||||
const zigzag = require('prismarine-nbt/zigzag')
|
||||
|
||||
function readUUID (buffer, offset) {
|
||||
if (offset + 16 > buffer.length) { throw new PartialReadError() }
|
||||
|
|
@ -160,6 +160,6 @@ module.exports = {
|
|||
entityMetadataLoop: [readEntityMetadata, writeEntityMetadata, sizeOfEntityMetadata],
|
||||
ipAddress: [readIpAddress, writeIpAddress, 4],
|
||||
endOfArray: [readEndOfArray, writeEndOfArray, sizeOfEndOfArray],
|
||||
zigzag32: zigzag.zigzag32,
|
||||
zigzag64: zigzag.zigzag64
|
||||
zigzag32: zigzag.interpret.zigzag32,
|
||||
zigzag64: zigzag.interpret.zigzag64
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ function createProtocol (version) {
|
|||
const compiler = new ProtoDefCompiler()
|
||||
compiler.addTypesToCompile(protocol.types)
|
||||
compiler.addTypes(require('../datatypes/compiler-minecraft'))
|
||||
compiler.addTypes(require('prismarine-nbt/compiler-zigzag'))
|
||||
compiler.addTypes(require('prismarine-nbt/zigzag').compiler)
|
||||
|
||||
const compiledProto = compiler.compileProtoDefSync()
|
||||
return compiledProto
|
||||
|
|
@ -47,7 +47,7 @@ function createProtocol (version) {
|
|||
function getProtocol (version) {
|
||||
const compiler = new ProtoDefCompiler()
|
||||
compiler.addTypes(require(join(__dirname, '../datatypes/compiler-minecraft')))
|
||||
compiler.addTypes(require('prismarine-nbt/compiler-zigzag'))
|
||||
compiler.addTypes(require('prismarine-nbt/zigzag').compiler)
|
||||
|
||||
global.PartialReadError = require('protodef/src/utils').PartialReadError
|
||||
const compile = (compiler, file) => require(file)(compiler.native)
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ function createProtocol (version) {
|
|||
const compiler = new ProtoDefCompiler()
|
||||
const protocol = mcData('bedrock_' + version).protocol.types
|
||||
compiler.addTypes(require('../src/datatypes/compiler-minecraft'))
|
||||
compiler.addTypes(require('prismarine-nbt/compiler-zigzag'))
|
||||
compiler.addTypes(require('prismarine-nbt/zigzag').compiler)
|
||||
compiler.addTypesToCompile(protocol)
|
||||
|
||||
fs.writeFileSync('./read.js', 'module.exports = ' + compiler.readCompiler.generate().replace('() =>', 'native =>'))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue