Merge pull request #557 from pokecosimo/master

* Added support for the new version of prismarine-nbt

* Update serializer.js

---------

Co-authored-by: extremeheat <extreme@protonmail.ch>
This commit is contained in:
extremeheat 2024-12-11 11:43:23 -05:00 committed by GitHub
commit f77c56b7f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -37,7 +37,6 @@ function createProtocol (version) {
const compiler = new ProtoDefCompiler()
compiler.addTypesToCompile(protocol.types)
compiler.addTypes(require('../datatypes/compiler-minecraft'))
compiler.addTypes(require('prismarine-nbt/zigzag').compiler)
const compiledProto = compiler.compileProtoDefSync()
return compiledProto
@ -47,7 +46,6 @@ function createProtocol (version) {
function getProtocol (version) {
const compiler = new ProtoDefCompiler()
compiler.addTypes(require(join(__dirname, '../datatypes/compiler-minecraft')))
compiler.addTypes(require('prismarine-nbt/zigzag').compiler)
global.PartialReadError = require('protodef/src/utils').PartialReadError
const compile = (compiler, file) => require(file)(compiler.native)