Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some packets dont get their types assigned properly (possibly bundle related) #2952

Closed
1 task
AffectedArc07 opened this issue May 25, 2024 · 0 comments
Closed
1 task

Comments

@AffectedArc07
Copy link

  • This issue is not solved in a development build

Unsure, I am running a compile of commit b0c4b7fe45024e59505ed132d2df9d61fd5f405d.

Server is Paper 1.20.6-97. Could this issue be down to paper remapping? It does remap plugins on startup now, which this may relate to.

Describe the bug
Supercut of the code

        if (packet.getPacketType() == PacketType.Play.Server.BUNDLE) {
            for (PacketContainer container : packet.getPacket().getPacketBundles().read(0)) {
                System.out.println(container.getType());
            }
        }

This is on a PacketListener with PacketType.Play.Server.BUNDLE and PacketType.Play.Server.SPAWN_ENTITY within the list of whitelisted types (there are more, this is non-exhaustive behaviour).

When spawning an entity I can see the following console log

[21:11:36 INFO]: UPDATE_ATTRIBUTES[class=ClientboundUpdateAttributesPacket, id=117]
[21:11:36 INFO]: Dynamic-b944c1c4-050a-4bd4-977d-8a7a2c95a0d0[class=ClientboundSetEquipmentPacket, id=91]
[21:11:36 INFO]: Dynamic-ad6a9364-13b5-475e-b23f-508a79c801e2[class=ClientboundAddEntityPacket, id=1]
[21:11:36 INFO]: Dynamic-a43b566a-82b0-465d-9245-5744f995fa62[class=ClientboundSetEntityDataPacket, id=88]

It is correctly assigning the type for the UPDATE_ATTRIBUTES packet, however it is not assigning the types for the other 3, which means any if (packet_type == PacketType.Play.Server.SPAWN_ENTITY) { check currently does not work.

To Reproduce
Steps to reproduce the behavior:

  1. Implement the code above (can provide a full gist of a class if needby)
  2. Spawn an entity
  3. Observe lack of types

Expected behavior
Types to assign properly

Screenshots
Logs posted above

Version Info
https://gist.github.com/AffectedArc07/2aed39fd14a048d0ad97d4f203272a33

Additional context
This code worked fine on 1.20.4 paper with ProtocolLib 5.1.1-SNAPSHOT, unsure of exact commit, roughly 150 behind current master.

Newer versions of paper like to remap plugins on startup and this behaviour cannot be turned off, which makes me wonder if this is responsible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant