Skip to content

Geoige/anvil-parser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

anvil-parser

Minecraft Anvil file parser in JS

Usage

Get NBTs from an Anvil file ArrayBuffer

var nbts = anvilToNbt.getNbts(mca)

Parse NBT (requires pako.js in scope)

var parser = new nbtParser.NBTParser();
var result = parser.parse(nbt);

Using with FileReader

var reader = new FileReader();
reader.onload = function(e) {
  var nbts = anvilToNbt.getNbts(reader.result);
  var parser = new nbtParser.NBTParser();
  var result = parser.parse(nbts[0]);
  console.log(result);
};

reader.readAsArrayBuffer(file);

About

Minecraft Anvil file parser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published