Closed roblabla closed 8 years ago
Before I start, I should mention that I have been actively running large public forge servers since tekkit first came out, and have been a fairly silent member of this community for years now. My two cents on this topic:
Anyway, just thought I might weigh in, I'll keep tabs and lemme know if you need anything ;)
Just wanted to note, from what I have seen on server lists most the community is on 1.7 or later. This site has various statistics: http://www.gametracker.com/games/minecraft/ . I would count on forge support for anything before 1.7 IMHO
node-forge-protocol will be implemented in its own module, in the following form :
module.exports = function injectForge(mc) {
if (mc == null)
mc = require('node-minecraft-protocol');
if (mc.protocol.version == '1.7')
return injectForge1_7(mc);
else if (mc.protocol.version == '1.6')
return injectForge1_6(mc);
else
return null;
}
This should avoid the problem of protocol support somewhat.
As for how horrible forge's protocol hack is, that's not a problem. I'm quite used to reading decompiled minecraft source by now :smile:.
The biggest problem you mention here is the mods reserving their own protocol packets (which is stupid, since they should be using custom_payload packet). However, that doesn't really matter, since I believe node-minecraft-protocol ignores unknown packets (this is actually an undefined behavior that's a side-effect of an optimization I made. Heh. Should standardize this). So unless the mod involved does really weird stuff with the protocol, we should be alright.
Furthermore, those packets which have added info can be supported by injecting their own packets through the same way I'll inject forge's packet. Though again, if mods do this, they're doing it wrong.
Any news about this?
Not really. Attention has gone elsewhere (mainly supporting multiple protocol versions, and right now we're migrating the binary parser to its own repo, ProtoDef). It's still in my personal todo though.
Updated documentation: http://wiki.vg/Minecraft_Forge_Handshake
Forge support working in https://github.com/PrismarineJS/node-minecraft-protocol/pull/326 [WIP] Forge client, but I'm only doing the client-side for now, so I'd suggest still keeping this issue open for server-side Forge support
Client support is in https://github.com/PrismarineJS/node-minecraft-protocol-forge Missing for this issue : server support.
I think https://github.com/PrismarineJS/node-minecraft-protocol-forge should be added in a plugins section in the readme, along with an explanation into how to create plugins like https://github.com/PrismarineJS/mineflayer#third-party-plugins and https://github.com/PrismarineJS/mineflayer/blob/master/doc/contribute.md#creating-a-third-party-plugin
https://github.com/PrismarineJS/node-minecraft-protocol#third-party-plugins is listed in the readme, https://www.npmjs.com/package/minecraft-protocol-forge now published. I think this issue can now be closed, future issues tracked in the nmp-f repository. Opened one for server-side Forge support: https://github.com/PrismarineJS/node-minecraft-protocol-forge/issues/6
Alright, let's close it :)
It has recently been suggested in the gitter that support for the forge protocol would be interesting. BungeeCord supports Forge servers and clients now, so it could be used as a reference.