{"meta":{"generator":"0.10.0","format":20,"date":1630504891327},"custom":{"general":{"name":"General","files":{"welcome":{"name":"Welcome","type":"md","content":"<h1 align=\"center\">Welcome to mineflayer-autocrystal 👋</h1>\r\n<p>\r\n  <a href=\"https://www.npmjs.com/package/mineflayer-autocrystal\" target=\"_blank\">\r\n    <img alt=\"Version\" src=\"https://img.shields.io/npm/v/mineflayer-autocrystal.svg\">\r\n  </a>\r\n  <a href=\"https://github.com/LINKdiscordd/mineflayer-autocrystal#readme\" target=\"_blank\">\r\n    <img alt=\"Documentation\" src=\"https://img.shields.io/badge/documentation-yes-brightgreen.svg\" />\r\n  </a>\r\n  <a href=\"https://github.com/LINKdiscordd/mineflayer-autocrystal/graphs/commit-activity\" target=\"_blank\">\r\n    <img alt=\"Maintenance\" src=\"https://img.shields.io/badge/Maintained%3F-yes-green.svg\" />\r\n  </a>\r\n  <a href=\"https://github.com/LINKdiscordd/mineflayer-autocrystal/blob/master/LICENSE\" target=\"_blank\">\r\n    <img alt=\"License: ISC\" src=\"https://img.shields.io/github/license/LINKdiscordd/mineflayer-autocrystal\" />\r\n  </a>\r\n</p>\r\n\r\n> mineflayer-autocrystal is a plugin that lets mineflayer bots automatically place and destroy end crystals.\r\n\r\n### 🏠 [Homepage](https://github.com/LINKdiscordd/mineflayer-autocrystal)\r\n\r\n[![Autocrystal CI](https://github.com/link-discord/mineflayer-autocrystal/actions/workflows/ci.yml/badge.svg)](https://github.com/link-discord/mineflayer-autocrystal/actions/workflows/ci.yml)\r\n\r\n## Install\r\n\r\n```sh\r\nnpm install mineflayer-autocrystal\r\n```\r\n\r\n## Example\r\n\r\n```js\r\nconst mineflayer = require('mineflayer')\r\nconst { autoCrystal } = require('../lib/index')\r\n\r\nfunction main() {\r\n\tconst bot = mineflayer.createBot({\r\n\t\thost: 'localhost',\r\n\t\tusername: 'AutoCrystal',\r\n\t})\r\n\r\n\tbot.loadPlugin(autoCrystal)\r\n\r\n\tbot.once('spawn', () => {\r\n\t\tbot.autoCrystal.options.logErrors = true\r\n\t\tconsole.clear()\r\n\t\tconsole.log('Spawned.')\r\n\t\tbot.chat('/gamemode creative')\r\n\t\tbot.chat('/give @s end_crystal 500')\r\n\t})\r\n\r\n\tbot.on('end', () => {\r\n\t\tmain()\r\n\t})\r\n\r\n\tbot.on('kicked', (reason) => {\r\n\t\tconsole.log(reason)\r\n\t\tmain()\r\n\t})\r\n\r\n\tbot.on('error', (reason) => {\r\n\t\tconsole.error(reason)\r\n\t\tmain()\r\n\t})\r\n\r\n\tbot.on('chat', async (username, message) => {\r\n\t\tif (username === bot.username) return\r\n\r\n\t\tswitch (message) {\r\n\t\t\tcase 'start':\r\n\t\t\t\tbot.chat('AutoCrystal enabled.')\r\n\t\t\t\tawait bot.autoCrystal.enable()\r\n\t\t\t\tbreak\r\n\r\n\t\t\tcase 'stop':\r\n\t\t\t\tbot.chat('AutoCrystal disabled.')\r\n\t\t\t\tawait bot.autoCrystal.disable()\r\n\t\t\t\tbreak\r\n\r\n\t\t\tcase 'holes':\r\n\t\t\t\tconst holes = await bot.autoCrystal.getHoles()\r\n\t\t\t\tbot.chat(`Found ${holes.length} holes made out of bedrock.`)\r\n\t\t\t\tbreak\r\n\r\n\t\t\tdefault:\r\n\t\t\t\tbreak\r\n\t\t}\r\n\t})\r\n}\r\n\r\nmain()\r\n```\r\n\r\n## Author\r\n\r\n👤 **Link#0069**\r\n\r\n* Github: [@LINKdiscordd](https://github.com/LINKdiscordd)\r\n\r\n## 🤝 Contributing\r\n\r\nContributions, issues and feature requests are welcome!<br />Feel free to check [issues page](https://github.com/LINKdiscordd/mineflayer-autocrystal/issues). \r\n\r\n## Show your support\r\n\r\nGive a ⭐️ if this project helped you!\r\n\r\n## 📝 License\r\n\r\nCopyright © 2021 [Link#0069](https://github.com/LINKdiscordd).<br />\r\nThis project is [GNU GPLv3](https://github.com/LINKdiscordd/mineflayer-autocrystal/blob/master/LICENSE) licensed.\r\n\r\n***\r\n_This README was generated with ❤️ by [readme-md-generator](https://github.com/kefranabg/readme-md-generator)_\r\n","path":"README.md"}}}},"classes":[{"name":"AutoCrystal","construct":{"name":"AutoCrystal","params":[{"name":"options","type":[[["Options"]]]},{"name":"bot","type":[[["Bot"]]]}]},"methods":[{"name":"debug","description":"Emits the debug log event with the specified message.","access":"private","params":[{"name":"message","description":"The message to be emitted.","type":[[["string"]]]},{"name":"options","description":"The options for the debug method.","type":[[["DebugOptions"]]]}],"returns":[[["void"]]],"meta":{"line":73,"file":"AutoCrystal.js","path":"lib"}},{"name":"findPosition","description":"Finds the best position to place the crystal on to.","access":"private","params":[{"name":"position","description":"Vec3 position.","type":[[["Vec3"]]]}],"async":true,"returns":{"types":[[["Vec3"]]],"description":"The position to place the crystal on."},"meta":{"line":94,"file":"AutoCrystal.js","path":"lib"}},{"name":"placeCrystal","description":"Places the crystal on the specified position.","access":"private","params":[{"name":"position","description":"Vec3 position.","type":[[["Vec3"]]]}],"async":true,"returns":{"types":[[["boolean"]]],"description":"A boolean indicating if the crystal was placed."},"meta":{"line":163,"file":"AutoCrystal.js","path":"lib"}},{"name":"breakCrystal","description":"Breaks the nearest crystal","access":"private","params":[{"name":"entity","description":"The crystal to break.","type":[[["Entity"]]]}],"async":true,"returns":{"types":[[["boolean"]]],"description":"A boolean indicating if the crystal was broken."},"meta":{"line":189,"file":"AutoCrystal.js","path":"lib"}},{"name":"getNearestPlayer","description":"Gets the nearest player","access":"private","async":true,"returns":{"types":[[["Player"]]],"description":"The nearest player entity object."},"meta":{"line":221,"file":"AutoCrystal.js","path":"lib"}},{"name":"getHoles","description":"Gets holes near the bot.","async":true,"returns":{"types":[[["Array","<"],["Vec3",">"]]],"description":"An array of Vec3 positions"},"meta":{"line":238,"file":"AutoCrystal.js","path":"lib"}},{"name":"start","description":"Starts the auto crystal","access":"private","async":true,"returns":[[["Promise","<"],["void",">"]]],"meta":{"line":268,"file":"AutoCrystal.js","path":"lib"}},{"name":"stop","description":"Stops the auto crystal","access":"private","async":true,"returns":[[["Promise","<"],["void",">"]]],"meta":{"line":316,"file":"AutoCrystal.js","path":"lib"}},{"name":"disable","description":"Disables the AutoCrystal","returns":[[["boolean"]]],"meta":{"line":328,"file":"AutoCrystal.js","path":"lib"}},{"name":"enable","description":"Enables the AutoCrystal","returns":[[["boolean"]]],"meta":{"line":337,"file":"AutoCrystal.js","path":"lib"}}],"meta":{"line":34,"file":"AutoCrystal.js","path":"lib"}}],"interfaces":[],"typedefs":[{"name":"Options","description":"Options for the `AutoCrystal` class.","type":[[["Object"]]],"props":[{"name":"ignoreInventoryCheck","description":"If the inventory check should be ignored.","optional":true,"default":true,"type":[[["boolean"]]]},{"name":"logDebug","description":"If the debug log should be emitted.","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"logErrors","description":"If errors should be logged.","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"damageThreshold","description":"If the damage exceeds the threshold, it will not place / break the crystal.","optional":true,"default":5,"type":[[["number"]]]},{"name":"delay","description":"The delay in ticks between each crystal placement.","optional":true,"default":1,"type":[[["number"]]]},{"name":"placeMode","description":"The mode used to place the crystal. Can be \"suicide\", \"safe\" or \"damage\".\rThe \"damage\" place mode will place the crystal on the block where the damage for the bot is the lowest\rand the damage for the opponent is the highest.","type":[[["string"]]]},{"name":"breakMode","description":"The mode used to break the crystal.","type":[[["string"]]]}],"meta":{"line":17,"file":"AutoCrystal.js","path":"lib"}},{"name":"DebugOptions","description":"Options for the debug method.","access":"private","type":[[["Object"]]],"props":[{"name":"useTime","description":"Will use the `console.time` method.","optional":true,"default":false,"type":[[["boolean"]]]},{"name":"useTimeEnd","description":"Will use the `console.timeEnd` method.","optional":true,"default":false,"type":[[["boolean"]]]}],"meta":{"line":58,"file":"AutoCrystal.js","path":"lib"}}],"externals":[]}