0.2.1 • Published 10 years ago

voxel-blockdata v0.2.1

Weekly downloads
2
License
MIT
Repository
github
Last release
10 years ago

voxel-blockdata

Store arbitrary per-block data in chunks

Useful for types of blocks requiring additional information beyond the block ID. Extends the voxel chunk format adding a 'blockdata' structure, mapping coordinates to a data object.

Used by:

Usage

Load with voxel-plugins, then:

var blockdata = game.plugins.get('voxel-blockdata');

Saving data (the data object should be JSON serializable):

blockdata.set(x, y, z, {foo: 'bar'});

Retrieving data:

var bd = blockdata.get(x, y, z);

License

MIT