feat(informer): ✨ add more detailed block metadata info
Uses `block.getProperties()`. Thanks to a [comment][1] [1]: https://github.com/PrismarineJS/mineflayer-pathfinder/pull/84/files#r541196424
This commit is contained in:
		| @@ -5,13 +5,13 @@ const v = require('vec3') | ||||
|  | ||||
| function block(pos) { | ||||
|     const block = pos ? bot.blockAt(v(pos)) : bot.blockAtCursor() | ||||
|     console.log(block) | ||||
|     console.log(block, block && block.getProperties()) | ||||
|     if (!block) { | ||||
|         cfg.quiet || bot.chat("empty") | ||||
|         return block | ||||
|     } | ||||
|     let info = [block.type, block.name] | ||||
|     if (block.metadata) info.push(block.metadata) | ||||
|     if (block.metadata) info.push(Object.entries(block.getProperties())) | ||||
|     cfg.quiet || bot.chat(info.join(": ")) | ||||
| } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user