Closed deathcap closed 8 years ago
The payloads for plugin channel messages are all structured differently, should this be something node-minecraft-protocol handles encoding/decoding instead of mineflayer? I think so. For reference: https://github.com/GlowstoneMC/Glowstone/blob/master/src/main/java/net/glowstone/net/handler/play/game/PluginMessageHandler.java#L45 (MC|Brand
, MC|BEdit
, and MC|BSign
payload decoding).
This should be reported as a glowstone bug too IMO
Why? It's correctly reporting bad packet structure (at least, it does recover - can still connect)
Oh, I thought it disconnected you. NVM then.
Related : PrismarineJS/node-minecraft-protocol#152
Closing, merged in https://github.com/PrismarineJS/mineflayer/pull/254
lib/plugins/game.js:
from http://wiki.vg/Plugin_channel#MC.7CBrand: this is "vanilla" (encoded as a UTF-8 string).
Mineflayer does not encode the buffer as a UTF-8 string (i.e., varint length prefix;
writeString()
in node-minecraft-protocol). This causes at least the Glowstone server to choke:tested with
node examples/echo.js localhost
against a Glowstone server. This can be fixed by manually adding the varint length:but there ought to be a better way