Skip to content

Packet id limitation #579

Open
Open
@DavyCraft648

Description

@DavyCraft648

Packet id limitation in UnsafeFloodgateAPI

public void sendPacket(UUID bedrockPlayer, int packetId, byte[] packetData) {
byte[] fullData = new byte[packetData.length + 1];
fullData[0] = (byte) packetId;
System.arraycopy(packetData, 0, fullData, 1, packetData.length);
packetChannel.sendPacket(bedrockPlayer, fullData, this);
}

https://github.com/GeyserMC/Geyser/blob/c98796aeb6fa121f33f598dfa46a09bb117c7531/core/src/main/java/org/geysermc/geyser/translator/protocol/java/JavaCustomPayloadTranslator.java#L127-L146

These codes were introduced when Minecraft Bedrock was 1.18.2, which max packet id was still 175. But now, packets added after 1.19.70 cannot be used because their packet id has exceeded 255. (blame mojang)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    Projects

    Status

    Todo

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions