-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.js
20 lines (18 loc) · 855 Bytes
/
test.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
const mcblockinfo = require('./index')
const fs = require('fs')
// console.log(mcblockinfo.isValidBlockID('3:81'))
// console.log(mcblockinfo.isValidBlockName('lol'))
// console.log(mcblockinfo.isValidBlockDisplayName('Dirt'))
// mcblockinfo.getBlockInfoFromIDs(['3:0', '2', '10']).then((res) => { console.log(res) })
// mcblockinfo.getBlockInfoFromNames(['dirt', 'grass', 'minecart']).then((res) => { console.log(res) })
// mcblockinfo.getBlockInfoFromDisplayNames(['Dirt', 'Grass Block', 'Minecart']).then((res) => { console.log(res) })
mcblockinfo.search('terracotta').then((res) => {
console.log(res)
mcblockinfo.getBlockImageObject(res.slice(0, 5)).then((img) => {
fs.writeFile('test.txt', img, function (err) {
if (err) return console.log(err)
console.log('Hello World > helloworld.txt')
})
})
})
// TODO: finish typings