PrismarineJS / minecraft-data

Language independent module providing minecraft data for minecraft clients, servers and libraries.
https://prismarinejs.github.io/minecraft-data
670 stars 224 forks source link

Protocol changes for 1.21.20: ServerboundDiagnosticsPacket & 1.21.2: ServerboundLoadingScreenPacket #905

Open xxAROX opened 3 months ago

xxAROX commented 3 months ago

Add ServerboundDiagnosticsPacket into bedrock/1.21.20/protocol.json

xxAROX commented 3 months ago

And ServerboundLoadingScreenPacket also I think - 1.21.2

xxAROX commented 3 months ago

Reproduce it with a relay on pmmp latest

xxAROX commented 3 months ago

Fix on serverbound event:

player.on("serverbound", ({name, params}, des) => {
        if ([312, 315].includes(name)) {
            des.canceled = true;
            // @ts-ignore
            player.upstream.sendBuffer(des.fullBuffer);
        }
    });