npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

minecraftlegion

v1.2.0

Published

Bot multi proposito para minecraft

Downloads

13

Readme

minecraftLegion

Minecraft multipurpose bot

This project are based on mineflayer & PrismarineJS repository

This program is part of the 3 of this project, Each part can be run independently, The other 2 parts are minecraftLegionWebServer & minecraftLegionWebClient

I recommend using the other two modules to help the bots communicate and take commands through the WebUI.

Install:

  • Install Node.js version 14+
  • go to the directory which you want to install into
  • run npm i minecraftlegion on command prompt
  • make a new file called config.js with the fields shown below

Edit config.js

const config = {
  server: '127.0.0.1', // Minecraft Server
  port: '', // Minecraft Port
  masters: [{ name: 'PlayerName' }, { name: 'SecondPlayerName' }], // Is requeried for manage the bot in game, *offline mode
  webServer: 'http://localhost', // minecraftLegionWebServer Web - Optional
  webServerPort: '3000' // minecraftLegionWebServer PORT - Optional
}
module.exports = config

To run a single bot:

node start_bot.js BotName

To use minecraftLegionWebServer

node index.js

This method connects automatically to minecraftLegionWebServer, and via the web, you can add bots/disconnects and manage the behavior.

To manage bots vía web go to minecraftLegionWebClient to see more!

Usage of commands in chat:

First, activate the bot attention "hi namebot" or "hi all" to start all bots simultaneously.

  • hi nameBot

Make the bot/s follow you.

  • come

Make the bot/s stand in the current position.

  • stay

Start memorizing the positions used to save the way to chests or patrol (get the bots to follow you around)

  • set start way

Save patrol, used for guard job (use command set start way before this one)

  • set save patrol

For set max distance to attack mobs or players

  • set distance 30

For set mode (pvp / pve / none), if bots are connected to minecraftLegionWebServer it wont attack other bots

  • set mode pvp

Set job (Currently only finished Guard)

  • set job guard

To help other bots in combat (need use minecraftLegionWebServer)

  • set help true

to finish commands

  • bye

For mining xyz_start xyz_end start_horientantion vertically / horizontalle set miner x y z x y z x+ horizontally

Current Jobs

  • Guard
    • Do a patrol for look near enemies
  • Miner
    • Make a tunel or hole
  • Farmer
    • Do placing plants and sapling trees
    • Potatoes, Carrots, Wheat, Melon, Pumpkin, Sweet berries..
    • Sapling Trees -> Woodcutter
  • Breeder
    • Feed animals! all types!
    • When there is surplus, sacrifice the surplus
  • Sorter Job
    • The bot search all nearest chest and they sort all items based on ID item
    • Also send to the server and other bots you have in each chest, NOW ALL BOTS GO DIRECTLY TO THE CHEST THAT STORES THE ITEM!

TODO

  • Optimize Sorter Job, need too many interaction with chests for sort all the items
  • Add custom Sort Items in chest, based on... any idea?
  • Add more behavior into Sorter Job, -> Craft items? if detect in chests no have enough of XXX items then craft it if they can? (Example swords?)
  • Make an Archer Job ( During how to have this behavior similar to guard job? )
  • Optimize combat Guard Job ( combat creepers, PVP, destroy shields)
  • Check day/night for sleep any sleep function? Add "general config" for send all bots to sleep for all jobs
  • Add Job builder! based on mineflayer-builder & Schematichs
  • Add placing torchs
  • Check some bugs with mining job when have a too many lava or water
  • Add a robust documentation =P
  • Think about chat commands, currently it is faster / comfortable with the front end, but if anyone wants to configure all boot via chat commands?
  • Add back guard

Please keep calm. I'm working hard on this project :D