Minecraft client running in NodeJS
He can be used like module or like minecraft client.
For install minecraftnodejs like client:
npm i -g minecraftjs (not if already installed)For install for use minecraftnodejs like a module like example:
npm i minecraftjs (not if already installed)When it installed globally, you can use minecraft command for launch my nodejs minecraft client.
He can connect to server without mods and offline mode. Auth will be added maybe later...
Singleplayer will connect you to your personal flying-squid server.
Multiplayer purpose you a list of servers, which you can change in public/assets/serverList.json. Click on a server for connect to him.
Options is just here for decroation for the moment.
const mineflayer = require('mineflayer')
const createClient = require('minecraftnodejs/module').createClient
//Create a bot
const bot = mineflayer.createBot({
username: "MinecraftJS",
port: 6257
})
//Connect a client to an existing bot
createClient(bot)Copy & paste this example for connect a client to an existing bot.
Arrows for move,
I for inventory,
Enter for chat,
RShift for sprint,
RCtrl for sneak,
End for jump,
A for drop the selected item,
1-9 for select the item (or !select <item_string_id> in chat for select the item),
Enter for send a message,
ArrowUp for go up in history of sended messages or commands,
ArrowDown for go down in history of sended messages or commands,
There are some bugs, so issue me if you caught one for correct them...