Skip to content

store arbitrary per-block data in chunks (voxel.js plugin)

Notifications You must be signed in to change notification settings

voxel/voxel-blockdata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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

About

store arbitrary per-block data in chunks (voxel.js plugin)

Resources

Stars

Watchers

Forks

Packages

No packages published