look up minecraft block types + metadata from binary level data
JavaScript CoffeeScript
Latest commit 1706dad Jul 17, 2013 @maxogden add colors
Permalink
Failed to load latest commit information.
.gitignore 0.0.0 Apr 4, 2013
index.js add colors Jul 18, 2013
original.coffee 0.0.0 Apr 4, 2013
package.json add colors Jul 18, 2013
readme.md 0.2.0 - add tons of metadata lookups Apr 19, 2013

readme.md

minecraft-blockinfo

look up minecraft block types + metadata from binary level data

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

minecraft is property of Mojang AB

var blockInfo = require('minecraft-blockinfo')
var minecraftBlockIdentifier = '_2'
blockInfo.blocks[minecraftBlockIdentifier]
// returns:
{
  id: 2,
  type: 'grass',
  rgba: [0.0, 0.6, 0.0, 1.0],
  t: [8, 2]
}

there is also metadata for various minecraft blocks and items:

[ 'colored_wool',
  'wooden_plank',
  'wood',
  'leaves',
  'torches',
  'slabs',
  'wooden_slab',
  'sandstone',
  'bed',
  'grass',
  'stairs',
  'attachments',
  'cobblestone_wall',
  'quartz',
  'coal',
  'blocks' ]

// e.g.:

blockInfo.wood

// returns
{
  "0": "oak_wood",
  "1": "spruce_wood",
  "2": "birch_wood",
  "3": "jungle_wood"
}

designed for use with browserify

license

BSD