{"id":25945065,"url":"https://github.com/zardoy/mineflayer-mouse","last_synced_at":"2026-04-01T19:32:37.437Z","repository":{"id":278840975,"uuid":"934330779","full_name":"zardoy/mineflayer-mouse","owner":"zardoy","description":"Your gaming mouse for Mineflayer as a plugin.","archived":false,"fork":false,"pushed_at":"2026-03-20T06:21:33.000Z","size":217,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-20T22:58:25.634Z","etag":null,"topics":["minecraft"],"latest_commit_sha":null,"homepage":"https://npmjs.com/mineflayer-mouse","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zardoy.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-02-17T16:44:50.000Z","updated_at":"2026-03-20T06:21:06.000Z","dependencies_parsed_at":null,"dependency_job_id":"4413b62b-0884-4852-a0a2-90df212733a1","html_url":"https://github.com/zardoy/mineflayer-mouse","commit_stats":null,"previous_names":["zardoy/mineflayer-mouse"],"tags_count":37,"template":false,"template_full_name":null,"purl":"pkg:github/zardoy/mineflayer-mouse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zardoy%2Fmineflayer-mouse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zardoy%2Fmineflayer-mouse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zardoy%2Fmineflayer-mouse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zardoy%2Fmineflayer-mouse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zardoy","download_url":"https://codeload.github.com/zardoy/mineflayer-mouse/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zardoy%2Fmineflayer-mouse/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31291147,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-01T13:12:26.723Z","status":"ssl_error","status_checked_at":"2026-04-01T13:12:25.102Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["minecraft"],"created_at":"2025-03-04T08:29:02.225Z","updated_at":"2026-04-01T19:32:37.409Z","avatar_url":"https://github.com/zardoy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# \u003cimg src=\"assets/mouse.svg\" width=\"28\" height=\"28\" alt=\"mineflayer-mouse\"\u003e Mineflayer Mouse\n\nFirst-class **battle-tested** simple API for emulating real Minecraft mouse control in Mineflayer. You should use it for digging (mining) or placing blocks and entity attacking or using and using items!\n\n\u003e Note: This module will be deprecated once the functionality is merged into the main `mineflayer` library with 1:1 implementation.\n\n## Installation\n\n```bash\npnpm add mineflayer-mouse\n```\n\n## Features\n\n- Predict block placement (optimistic update, needed for correct physics on high ping)\n- Block breaking server cancellation\n- Accurate entity raycasting (targeting)\n- Debug logging\n\n## Philosophy\n\n\u003e Note: this library is used in [minecraft web client](http://github.com/zardoy/prismarine-web-client/) project. Try mineflayer viewer lib: [mcraft-fun-mineflayer](https://npmjs.com/mcraft-fun-mineflayer) to see it in action!\n\nThe world interaction system in Minecraft is *complex* and not easy to replicate. We have two hands and different holding item/blocks logic along with different entities and activatable items and blocks in the world. For example:\n\n- Would what happen if you right click on a crafting table with a torch in left hand and potion in right hand? But if you are shift clicking it? But if you are loooking at entity? Should the item be used or entity interaction happen?\n\nUsing hardcoded methods like `bot.attack` will make your bot act not natural and more likely would result in ban.\n\n## Usage\n\n```ts\nimport { createMouse } from 'mineflayer-mouse';\nimport { createBot } from 'mineflayer';\n\nconst bot = createBot({\n  host: 'localhost',\n  port: 25565,\n});\n\nbot.loadPlugin(createMouse());\n\n// based on returned entity or block you can determine what action would happen (you cant enfoce specific action since thats not how game works)\nconst { entity, cursorBlock, cursorBlockDiggable } = bot.mouse.getCursorState();\n\n// attack entity\nbot.leftClick();\n// start digging block\nbot.leftClickStart()\n// stop digging block\nbot.leftClickEnd()\n\n// place block\nbot.rightClick()\n\n// start placing block\nbot.rightClickStart()\n\n// ...\n```\n\n## Roadmap\n\n- [X] Tests\n- [X] Block placement prediction\n- [X] Raycast, item/block activatable, block prediction overrides\n- [X] Better item activation\n- [ ] Arm animation \u0026 use item on block place check world env\n- [ ] Validate packets on item activation on entity\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzardoy%2Fmineflayer-mouse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzardoy%2Fmineflayer-mouse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzardoy%2Fmineflayer-mouse/lists"}