2

I'm using Lidgren as a networking library for my server application. I am just trying to learn how things can tie together in a real environment (database access, networking, physics, etc), so I decided that I would write a basic server application for Minecraft. It doesn't need to be fully functional, just have the packet handling and whatnot working.

However, my problem is that Lidgren just seems to outright ignore any packets from Minecraft. Why could this be?

        var peerConfig = new NetPeerConfiguration("MinecraftDotNet")
        {
            Port = port,
            AcceptIncomingConnections = true
        };


        peerConfig.EnableMessageType(NetIncomingMessageType.ConnectionApproval);

        _lidgrenServer = new NetServer(peerConfig);
        _lidgrenServer.Start();

My output shows Debug Messages from Lidgren, but the Minecraft client cannot seem to "see" the server (And I am not getting any incoming packets from the client, either)

Dan
  • 10,282
  • 2
  • 37
  • 64

2 Answers2

2

Ok a little bit over time, Minecraft doesn't understand how to read lidgren packages.

UrKll
  • 913
  • 1
  • 8
  • 11
  • This is correct, but not the issue at hand - Lidgren does not understand how to read non-Lidgren packets, presumably due to Lidgren appending a header or similar. – Dan Apr 22 '14 at 08:29
  • This is correct. Reliability and connection management requires a custom protocol which minecraft does not understand. – lidgren May 14 '14 at 07:13
  • 1
    ... also, AFAIK minecraft uses TCP, and Lidgren uses UDP. – lidgren May 14 '14 at 07:13
1

As there has been no answer, I will close this question. It seems that due to some limitation of Lidgren, it can only receive messages that were written in Lidgren clients.

Dan
  • 10,282
  • 2
  • 37
  • 64