PrismarineJS / prismarine-block

Represent a minecraft block with its associated data
29 stars 32 forks source link

prismarine-block

NPM version Build Status

Represent a minecraft block with its associated data

Usage

const registry = require('prismarine-registry')('1.8')
const Block = require('prismarine-block')(registry)

const stoneBlock = new Block(registry.blocksByName.stone, registry.biomesByName.plains, /* meta */ 0)

console.log(stoneBlock)

// can you harvest stone with an iron pickaxe?
console.log(stoneBlock.canHarvest(257))

// how many milliseconds does it takes in usual conditions? (on ground, not in water and not in creative mode)
console.log(stoneBlock.digTime(257))

API

See doc/API.md

History

1.19.0

1.18.0

1.17.1

1.17.0

1.16.3

1.16.2

1.16.1

1.15.0

1.14.1

1.14.0

1.13.1

1.13.0

1.12.0

1.11.0

1.10.3

1.10.2

1.10.1

1.10.0

1.9.0

1.8.0

1.7.3

1.7.2

1.7.1

1.7.0

1.6.0

1.5.1

1.5.0

1.4.0

1.3.0

1.2.0

1.1.1

1.1.0

1.0.1

1.0.0

0.1.0