PrismarineJS / mineflayer

Create Minecraft bots with a powerful, stable, and high level JavaScript API.
https://prismarinejs.github.io/mineflayer/
MIT License
4.88k stars 894 forks source link

Create automated testing script so people can report better on their server #1200

Open rom1504 opened 4 years ago

rom1504 commented 4 years ago

Basically what we have as external test but so people can start it manually and report

could also be used automatically on a bunch of non vanilla

rom1504 commented 4 years ago

related https://github.com/PrismarineJS/mineflayer/issues/1199

rom1504 commented 4 years ago

https://github.com/PrismarineJS/mineflayer/blob/master/test/externalTest.js

ghost commented 4 years ago
const mineflayer = require('mineflayer')
bot = mineflayer.createBot({
//for username, this should be an email if the account needs to authenticate via minecraft.
//if the server is in offline mode (aka cracked) then do not define password field.
  host: 'example.host.com',
  port: 25567 //defaults to 25565 if undefined, change this if the server uses another port.
  username: 'your@email.here'
  password: 'yourpassword123' //only define this if you need to verify via minecraft. otherwise, you should delete this entire line
//if you need more info on the createBot function, visit this link: https://github.com/PrismarineJS/mineflayer/blob/master/docs/api.md#mineflayercreatebotoptions
})
bot.on('login', ()=>{
  console.log('logged in successfully')
})
bot.on('error', function (error) {
  console.log(error) //this is where we implement the auto report / dumping
})

someone probably beat me to this, im typing from my bed :P