This library converts between .mcstructure and prismarine-schematic(which can be exported as Sponge Schematic Version 2)
Currently supports mcstructure to prismarine-schematic conversion.
npm install prismarine-mcstructure-unofficial
const fs = require('fs')
const path = require('path')
const { parseMcStructureBuffer } = require('prismarine-mcstructure-unofficial')
async function sample() {
const sampleMcStructure = fs.readFileSync(
path.join(__dirname, 'sample.mcstructure'),
)
const schematic = await parseMcStructureBuffer(sampleMcStructure)
const schemBuffer = await schematic.write()
fs.writeFileSync(path.join(__dirname, 'sample.schem'), schemBuffer)
}
sample()