minecraft-blockinfo
hashtable for looking up minecraft block types from binary level data
Last updated 13 years ago by maxogden .
BSD · Original npm · Tarball · package.json
$ npm install minecraft-blockinfo 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.3.0                                ...           latest (13 years ago)

4 Versions

  • 0.3.0                                ...           13 years ago
  • 0.2.0                                ...           14 years ago
  • 0.1.0                                ...           14 years ago
  • 0.0.0                                ...           14 years ago
Maintainers (1)
Downloads
Total 15
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 0
Last Month 4
Dependencies (0)
None
Dev Dependencies (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE