Skip to main content

Cloning

Since the project is open-source, it's possible to make your own version of Sandmine.js!

Step 1: Installation

Install VSCode (or any other IDE you like), Git, and Node.js.

Step 2: Opening LAN World

If you're planning to make a local connection, you must follow this step.

  1. Open Minecraft and open your Single player world.

  2. Go to your Game Menu and Click on Open to LAN. image

  3. After that, click on Start LAN World. image

  4. You'll now see a new message pop up on your Minecraft chat specifying the port.

image

Warning

Make sure that you do NOT copy mine since it's different for everyone.

Step 3: Configuration

Open Visual Studio Code, open a folder, and do:

git clone https://github.com/SpreeHertz/Sandmine.js.git

then do:

cd Sandmine.js-master

Providing information

  1. Go to .env.example, and specify the port that I told you to note in the previous subtopic. (Please note that the port always changes when hosting locally everytime you start up your LAN server.)
  2. For host=, Give it localhost if you're hosting locally.
  3. Finally, rename .env.example to .env.

Go to config.json. There are some values you'll see. Here's what they do:

mobToKill - When the bot sees this particular mob, it will start killing it. If you don't want this feature, you can leave this value empty.

Step 4: Start the bot

In order to start the bot, open a New Terminal by clicking on Terminal (top) > New Terminal.

Required commands

Install the dependencies by doing:

yarn install

Then do this to start your bot:

node .

Optional commands

For testing purposes, you can do:

yarn dev

To check if there are any code formatting / code styling issues, you can do:

yarn lint

And there you go! Your bot should be working properly by now.