Closed ghost closed 3 years ago
What code did you use to log in with?
const options = {
host: process.argv[2],
port: parseInt(process.argv[3]),
version: "1.13.2",
username: process.argv[4]
};
var bot = mineflayer.createBot(options)
navigatePlugin(bot);
bot.navigate.blocksToAvoid[132] = true;
bot.navigate.blocksToAvoid[59] = false;
bot.loadPlugin(tpsPlugin)
bot.settings.viewDistance = "tiny"
bot._client.on('map', ({ data,itemDamage })=> {
let invL = bot.inventory.slots.filter(el=> el !== null)
let slotM = invL.find(item => (item && item.displayName || ' ') == "Map")
if (slotM !== undefined) {
if(!data) return;
const size = Math.sqrt(data.length);
const image = PNGImage.createImage(size, size);
for(let x = 0; x < size; x++) {
for(let z = 0; z < size; z++) {
const colorId = data[x + (z * size)];
image.setAt(x, z, md.getColor(colorId));
}
}
image.writeImage(`${__dirname}/captha.png`, function (err) {
if (err) throw err;
});
easyvk({access_token: token}).then(_vk => {
vk = _vk;
return vk.uploader.getUploadURL(
'photos.getMessagesUploadServer', {}, true
)
}).then(async ({url, vkr}) => {
const field = 'photo'
const server = vk.uploader
const filePath = path.join(__dirname, 'captha.png')
url = url.upload_url
let fileData = await server.uploadFile(url, filePath, field, {})
fileData = await vk.post('photos.saveMessagesPhoto', fileData)
fileData = fileData[0]
const attachments = [
`photo${fileData.owner_id}_${fileData.id}_${fileData.access_key}`
]
return vk.call('messages.send', {
user_id: config.user_id,
attachment: attachments,
message: 'Карта из инвентаря',
random_id: easyvk.randomId()
});
});
}else{
return
}
});
bot.on('message', function (jsonMessage) {
if (chat == true) {
easyvk({access_token: token}).then(_vk => {
vk = _vk;
return vk.call("messages.send", {
message: '[Чат]'+jsonMessage.toString(),
user_id: config.user_id,
random_id: easyvk.randomId()
});
});
};
});
What's the error ?
You need to answer to plugin request packet
You need to answer to plugin request packet
what?
@rom1504 what exactly?
Your server is asking you to send the login.login_plugin_request
packet. You are not sending it. Your server is not a vanilla server, so you need to add additional support for whatever mods your server has installed.
Your server is asking you to send the
login.login_plugin_request
packet. You are not sending it. Your server is not a vanilla server, so you need to add additional support for whatever mods your server has installed.
How about? how can you do it? Spigot server, no mods
Your server is asking you to send the
login.login_plugin_request
packet. You are not sending it. Your server is not a vanilla server, so you need to add additional support for whatever mods your server has installed.How about? how can you do it? Spigot server, no mods
No idea.
Your server is asking you to send the
login.login_plugin_request
packet. You are not sending it. Your server is not a vanilla server, so you need to add additional support for whatever mods your server has installed.How about? how can you do it? Spigot server, no mods
No idea.
Can I somehow display sent and received packages in the official minecraft launcher ?
@goncharovchik Yes, you want to take a look at the mc-protocol proxy example. https://github.com/PrismarineJS/node-minecraft-protocol/tree/master/examples/proxy
@TheDudeFromCI But it doesn't output authorization packets.
The proxy outputs all packets that are sent between the client and the server.
The proxy outputs all packets that are sent between the client and the server.
strange but there were no packages login
This only shows packets between the client and the server. Authentication with Mojang is a seperate process and is unrelated to your issue above.
Это показывает только пакеты между клиентом и сервером. Аутентификация с помощью Mojang - это отдельный процесс, не связанный с указанной выше проблемой.
well, I meant the packages that I showed before At the moment such packets are not displayed by the proxy
You use the vanilla Minecraft client with the proxy, make note of all packets that are being sent, and compare it to your bot. What packets is Minecraft sending that your bot is not sending?
Versions
Clear question
The bot is not included in the server.
What did you try yet?
-
Your current code
Please put here any custom code you tried yet.
Here's what the debug output:
Additional context