Skip to content

max-mapper/minecraft-mca

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

minecraft-mca

minecraft .mca region data file pure js parser

extracted from code originally written by @ithkuil for mcchunkloader, turned into a module and now maintained by @maxogden

minecraft is property of Mojang AB

// example using voxel.js
var readMCA = require('minecraft-mca')
var mcRegion = require('minecraft-region')
var region = mcRegion(binaryRegionData)
var opts = {ymin: 0, onVoxel: function(x, y, z, type, offsetX, offsetZ) {
  game.setBlock([(offsetX * 16) + x, y, (offsetZ * 16) + z], type)
}}
var mca = readMCA(region, opts)
mca.loadAll() // loads all 1024 chunks in this region
mca.loadNearby(0, 0, 1) // loads 1 in each direction
mca.loadChunk(4, 4) // loads single chunk

this module works with minecraft-chunk and is used by minecraft-mca

designed for use with browserify

license

BSD

About

minecraft .mca region data file pure js parser

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published