How to use the prismarine-nbt.parse function in prismarine-nbt

To help you get started, we’ve selected a few prismarine-nbt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github InventivetalentDev / MineRender / src / model / modelConverter.js View on Github external
loadNBT(structure).then((rawNbt) => {
        NBT.parse(rawNbt, (err, data) => {
            if (err) {
                console.warn("Error while parsing NBT data");
                console.warn(err);
                return;
            }

            if (!PRODUCTION) {
                console.log("NBT Data:")
                console.log(data);
            }

            parseStructureData(data).then((data) => {
                cb(data);
            })
        })
    })
github 1b8 / schematic / lib / main.js View on Github external
Schematic.parse = function (data, callback) {
  if (!callback) callback = function (err) {
    if (err) throw err;
  };

  nbt.parse(data, function (err, data) {
    callback(err, err ? null : new Schematic(data));
  });
};

prismarine-nbt

A parser and serializer for NBT archives

MIT
Latest version published 8 days ago

Package Health Score

81 / 100
Full package analysis