moincraft

๐Ÿค– Mineflayer Core

Mineflayer plugin stack, pathfinding, behavior trees, PvP, and performance rules behind Moincraft bots.

Mineflayer is the protocol/runtime foundation beneath every embodied Moincraft agent.

Essential plugins#

Plugin Why it matters
mineflayer-pathfinder Mandatory navigation and goal execution.
mineflayer-statemachine Structured behavior trees instead of if/else sprawl.
mineflayer-pvp Combat timing, shield/crit handling.
mineflayer-auto-eat Survival hygiene.
mineflayer-collectblock Block/resource collection flows.
mineflayer-armor-manager Best-armor auto-equip.
minecraft-data, prismarine-item, vec3 Versioned world/item/vector primitives.

Bot creation baseline#

  • keep swarm bots headless and cheap;
  • prefer viewDistance: "tiny" for non-explorer roles;
  • disable unnecessary physics/listeners when a bot is mostly idle;
  • always wire kicked and error handlers.
  • Load pathfinder once.
  • Use explicit goals like GoalNear, GoalBlock, and GoalFollow.
  • Tune movements deliberately: avoid lava, protect containers, cap dangerous drops, and only allow digging/parkour when intended.
  • Stop navigation explicitly before conflicting actions.

State machine posture#

Use state machines for multi-step behavior transitions. Idle, follow, gather, defend, and recover should be states with explicit transition predicates.

Performance rules for swarms#

  1. Do not run many bots in one Node process.
  2. Keep chat regexes and listeners minimal.
  3. Lower view distance for non-visual roles.
  4. Disable costly features when inactive.
  5. Separate heavy pathfinding from unrelated agents by process.

Sources: wiki/content/docs/mineflayer.md, moincraft/docs/bot-architecture.md, moincraft/SKILLS.md.