PrismarineJS / node-minecraft-protocol

Parse and serialize minecraft packets, plus authentication and encryption.
https://prismarinejs.github.io/node-minecraft-protocol/
BSD 3-Clause "New" or "Revised" License
1.23k stars 239 forks source link

1.13 Support #576

Closed lluiscab closed 6 years ago

lluiscab commented 6 years ago

Here we go again.

So, I'm trying to createServer for 1.13 to use it as a proxy (See this comment).

My server starts but errors as soon as a client tries to ping it on the server list. Each time I ping the server, this error appears on the console, even tho I have no error event handlers.

Chunk size is 55 but only 3 was read ; partial packet : {"name":"legacy_server_list_ping","params":{"payload":1}}; buffer :fe0101fa000b004d0043007c00500069006e00670048006f0073007400197f0009006c006f00630061006c0068006f00730074000063dd

I've tried with 1.12 as version but with my client being 1.12.2 and this also happens, whereas if I change the server version to 1.12.2, it doesn't happen anymore so I'm guessing that this error is caused by some kind of version mismatch.

My current code can be seen here I'd really appreciate some help figuring this out.

rom1504 commented 6 years ago

1.13 is not supported yet so don't even try it.

What you are showing is not an error but a warning, it has no consequences. What happens next ?

On Thu, Aug 2, 2018, 14:12 lluiscab notifications@github.com wrote:

Here we go again.

So, I'm trying to createServer for 1.13 to use it as a proxy (See this comment https://github.com/PrismarineJS/mineflayer/issues/315#issuecomment-343660526 ).

My server starts but errors as soon as a client tries to ping it on the server list. Each time I ping the server, this error appears on the console, even tho I have no error event handlers.

Chunk size is 55 but only 3 was read ; partial packet : {"name":"legacy_server_list_ping","params":{"payload":1}}; buffer :fe0101fa000b004d0043007c00500069006e00670048006f0073007400197f0009006c006f00630061006c0068006f00730074000063dd

I've tried with 1.12 as version but with my client being 1.12.2 and this also happens, whereas if I change the server version to 1.12.2, it doesn't happen anymore so I'm guessing that this error is caused by some kind of version mismatch.

My current code can be seen here https://pastebin.com/raw/njQmW4n5 I'd really appreciate some help figuring this out.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/node-minecraft-protocol/issues/576, or mute the thread https://github.com/notifications/unsubscribe-auth/ACPN_iQ-MtuAB8TImdWubFqQPUBInp8Vks5uMuzFgaJpZM4VsKu0 .

lluiscab commented 6 years ago

My client won't connect to the server. List appears as "Can't connect to server" and any attempts to connect to the server will just automatically end in "Disconnected"

See screenshots here

rom1504 commented 6 years ago

1.13 support is tracked in https://github.com/PrismarineJS/minecraft-data/issues/200

rom1504 commented 6 years ago

the rest of the issues are unrelated to 1.13, and already tracked elsewhere

AnthonyTsang commented 6 years ago

1.13 is updating the plugin channels, some of them are using dedicated packet now. This repo needs to be updated as well.

lluiscab commented 6 years ago

There's currently a pending of aproval PR over at minecraft-data. We should start looking at what needs to be updated here.

AnthonyTsang commented 6 years ago

Things to do, Update these changes https://wiki.vg/index.php?title=Pre-release_protocol&oldid=14150#Plugin_Channels For the channels renamed, it is just a find all and replace. e.g. minecraft:register But some of them is replaced by packet. e.g. MC|PickItem

lluiscab commented 6 years ago

The only two channels that I see are used by NMP are here so it should just be a simple rename right? The channels that have been replaced by a packet aren't really used here AFAIK so I guess we don't do anything with them and handle them later in mineflayer?

rom1504 commented 6 years ago

It might be a good opportunity to move the definition of these channels to Minecraft data. That would remove some completely from nmp and mineflayer and make keeping multi version support simpler. I think there is a dedicated issue for that in Minecraft data.

lluiscab commented 6 years ago

Woldn't that mean that we'd need to update all the protocol.json files in minecraft data with the channel definitions?

rom1504 commented 6 years ago

It would probably go in a channels.json file but yes it might mean that. This file could be the same everywhere though (that's what nmp currently do since we use the same definition for all versions)

On Wed, Aug 8, 2018, 10:39 lluiscab notifications@github.com wrote:

Woldn't that mean that we'd need to update all the protocol.json files in minecraft data with the channel definitions?

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/PrismarineJS/node-minecraft-protocol/issues/576#issuecomment-411331792, or mute the thread https://github.com/notifications/unsubscribe-auth/ACPN_l1GwpbSEBVTsioxu7OVutX_OTs6ks5uOqO9gaJpZM4VsKu0 .

lluiscab commented 6 years ago

I actually made a fork and added a version check to change the channel names but couldn't really figure out how to test that with my own minecraft-data.

rom1504 commented 6 years ago

You'd need to update node-minecraft-data too and base your nmp fork on your branch of nmd. But otherwise just wait a bit, I'll try to review this asap so you can move forward