Skip to content

[1.21] Update inventory logic to work with ContainerClick packet #698

@maxomatic458

Description

@maxomatic458

1.21 changed the ContainerClick packet to not contain the itemcomponents of the transferred item, but just a hash.
https://minecraft.wiki/w/Java_Edition_protocol/Packets#Click_Container

Therefore we need to make sure that we can figure out what/where the original item(s) are + what components they have so we properly simulate the item movement so our server is not desynced.

I believe depending on how reliable the packet itself is (the packet contains a list of new slots; So if we can reliably understand what items moved to what new position, we can easily figure out the components).
The underlying hashing used in the new packet might not be required for this depending on how good the server side inventory simulation is => can we reliably figure out the full movement of slot A to slot B based on the packet?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions