Commit Graph

9 Commits

Author SHA1 Message Date
Pasqual Koschmieder
aa663ced8b fix more tests 2023-09-23 10:11:19 -05:00
Dan Mulloy
a6903c2bb0
Convert tabs to spaces 2023-05-12 10:35:34 -04:00
Lukas Alt
2931af58db
Added wrappers for MessageSignature (#2362) 2023-04-30 22:28:19 -05:00
Lukas Alt
08ea2da642
Improved Wrapping of PlayerInfoData and support chat session data (#2361)
* Improved Wrapping of PlayerInfoData and support chat session data
* added constructor for unambiguous creation of playerinfodata without signature
2023-04-29 19:49:51 +00:00
Lukas Alt
aebefded86
Packet filtering for bundled packets in 1.19.4 (#2258)
Since Minecraft 1.19.4, the protocol supports bundling consecutive packets to ensure the client processes them in one tick. However, Packet Events are not called for the individual packets in such a bundle in the current dev build of ProtocolLib. For example, no packet events are currently sent for the ENTITY_METADATA packet when an entity is first spawned as the packet is bundled with the ENTITY_SPAWN packet. However, if the entity metadata is changed later on, the event will be called.
This PR proposes to fix this by unpacking the bundled packets and invoking the packet filtering for each packet.

I also want to briefly explain how the bundling works. A bundle starts with a PACKET_DELIMITER (0x00, net.minecraft.network.protocol.BundleDelimiterPacket) packet followed by all packets that should be bundled and finished with another PACKET_DELIMITER (0x00). Within the Netty pipeline, this sequence is transformed into one synthesized packet found in net.minecraft.network.protocol.game.ClientboundBundlePacket, which is essentially just a list of packets. At the stage at which ProtocolLib injects into the clientbound netty pipeline, this packet has not been unpacked yet. Thus, we need to handle the ClientboundBundlePacket, which unfortunately is not registered in ProtocolLib. The fact that two different classes map to the same packet currently requires a dirty remapping in the packet structure modifier.
2023-03-25 21:08:31 -05:00
Dan Mulloy
6aaf0ec26b
Normalize line endings to LF 2022-12-07 13:52:09 -05:00
games647
11a8184c3e
Add StructureModifier for extracting the signature data in chat and login packets (#1742) 2022-07-26 13:29:34 -04:00
derklaro
55f7b67f9d
Update to junit 5, remove powermock 2022-02-25 00:11:26 -05:00
Dan Mulloy
7b7449ee15 Migrate to Gradle with a single module 2018-09-22 17:48:06 -04:00