mineflayer
mineflayer copied to clipboard
HandshakeReset error
- [x] The FAQ doesn't contain a resolution to my issue
Versions
- mineflayer: 4.3.0
- server: spigot with ajQueue
- node: 16 LTS
- minecraft: 1.12.2
Detailed description of a problem
When I try to connect to another server through /queue
Error: Read error for unknown : HandshakeReset has no associated fieldInfo in switch
Your current code
/**
* A quick and easy implementation of the collect block plugin. (Requires mineflayer-pathfinder and mineflayer-collectblock)
*/
var mc = require("minecraft-protocol");
var forgeHandshake = require("minecraft-protocol-forge").forgeHandshake;
const pathfinder = require("mineflayer-pathfinder").pathfinder;
const { mineflayer: mineflayerViewer } = require("prismarine-viewer");
const mineflayer = require("mineflayer");
const bot = mineflayer.createBot({
host: "<server_ip>",
username: "<user_name>",
version: "1.12.2",
});
forgeHandshake(bot._client, {
forgeMods: [
{ modid: "minecraft", version: "1.12.2" },
{ modid: "mcp", version: "9.42" },
{ modid: "FML", version: "8.0.99.99" },
{ modid: "Forge", version: "14.23.5.2860" },
{ modid: "storagenetwork", version: "1.8.3" },
{ modid: "locks", version: "3.0.0" },
{ modid: "ironchest", version: "7.0.72.847" },
{ modid: "foamfix", version: "0.10.14" },
{ modid: "betterfurnacesreforged", version: "1.5" },
{ modid: "pixelmon", version: "8.4.0" },
{ modid: "travelersbackpack", version: "1.0.35" },
{ modid: "jei", version: "4.16.1.301" },
],
});
bot.loadPlugin(pathfinder);
// Load mc data
let mcData;
bot.once("spawn", () => {
mcData = require("minecraft-data")(bot.version);
mineflayerViewer(bot, { port: 3000 });
console.log("Spawned!");
bot.chat("/login 12345678");
setTimeout(() => {
bot.chat("/queue server_one");
}, 5000);
});
The Latest Packet received before crashing
minecraft-protocol read packet play.transaction +26ms
minecraft-protocol {
minecraft-protocol "windowId": 0,
minecraft-protocol "action": -25738,
minecraft-protocol "accepted": false
minecraft-protocol } +0ms
minecraft-protocol writing packet play.transaction +0ms
minecraft-protocol { windowId: 0, action: -25738, accepted: true } +0ms
minecraft-protocol read packet play.custom_payload +15ms
minecraft-protocol {
minecraft-protocol "channel": "FML|HS",
minecraft-protocol "data": {
minecraft-protocol "type": "Buffer",
minecraft-protocol "data": [
minecraft-protocol 254,
minecraft-protocol 0
minecraft-protocol ]
minecraft-protocol }
minecraft-protocol } +0ms
Expected behavior
Be teleported to the server without crashing
Possible solution node-minecraft-protocol-forge PR
Getting the same exact error attempting to do the same thing
Apparently minecraft-protocol-forge
is outdated on npm