Commit Graph

59 Commits

Author SHA1 Message Date
mani123
65a9ef5acf
Initial Folia support (#2346)
Co-authored-by: Dan Mulloy <dev@dmulloy2.net>
2023-06-10 19:08:11 -05:00
Photon-GitHub
c1ceb472f1
Some code cleanup (#2414) 2023-06-05 08:42:55 -05:00
Lukas Alt
92faaeed46
Added method to get RemoteChatSession from player (#2406) 2023-06-05 08:33:39 -05:00
Dan Mulloy
a6903c2bb0
Convert tabs to spaces 2023-05-12 10:35:34 -04:00
Hasan Demirtaş
46f6e76f91
Add BlockEntityType support. (#2111) 2023-05-06 17:18:09 -05: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
Dan Mulloy
c69bcc36f5
Migrate to Gradle (#2319) 2023-04-15 16:09:15 -05:00
Lukas Alt
0ee93acd65
Fixed null packet handles in Bundle (#2328) 2023-04-11 08:13:03 -05: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
05fa147b48
WIP: 1.19.4 update 2023-03-23 13:43:22 -05:00
Dan Mulloy
531f28cbaf
Fix sounds in 1.19.3
Fixes #2049
2023-01-10 16:36:01 -05:00
Mathéo Cimbaro
30b69d3ecf
Added PacketContainer#getUUIDLists() (#2072)
The 1.19.3 PlayerListRemove is the first one using List<UUID>

Fixes #2048
2023-01-10 03:43:39 +00:00
Dan Mulloy
eebb99fa37
1.19.3 update
Co-authored-by: Pasqual Koschmieder <pasqual.koschmieder@gmail.com>
2022-12-13 20:38:37 -05:00
Dan Mulloy
6aaf0ec26b
Normalize line endings to LF 2022-12-07 13:52:09 -05:00
Pasqual Koschmieder
43145bd478
cleanup MonitorAdapter (#1831) 2022-08-24 00:53:55 +00:00
Pasqual Koschmieder
6707c4811e
only run inbound listeners on the main thread if requested (#1851) 2022-08-16 23:51:54 -04:00
Miklas
7fd4ec3172
Support for 1.18+ ClientboundLevelChunkWithLightPacket (#1592) 2022-08-06 18:52:42 -04:00
Pasqual Koschmieder
7ddfd4f347
Fix & improve PacketContainer serialization & cloning (#1794) 2022-07-31 11:54:26 -04:00
Pasqual Koschmieder
d40762e69d
Update to 1.19.1 (#1699)
* add support for enforceSecureChat in ServerPing
* remove security exception check from test
2022-07-27 17:09:25 -04:00
games647
11a8184c3e
Add StructureModifier for extracting the signature data in chat and login packets (#1742) 2022-07-26 13:29:34 -04:00
Photon-Github
624f6aaca6
Anonymous Class Replacement 2022-07-24 11:02:56 -04:00
Pasqual Koschmieder
c5f0550953
Use MethodHandles for reflection (#1561)
* don't enforce async calls for thread-safe listeners (closes #1551)
* cleanups, remove structure compiling
* improve cloning a bit
* fix small issue in no-op structure modifier
* remove last usages of FieldUtils
* improve and fix equality check in container test
2022-07-24 10:16:05 -04:00
Pasqual Koschmieder
7f0bc7fd24
don't suppress deserialization issues (#1759) 2022-07-24 10:08:35 -04:00
Pasqual Koschmieder
9a609c2053
fix compile issues introduced by latest spigot api changes (#1622) 2022-06-11 11:57:25 -04:00
Pasqual Koschmieder
84a0b5ffdd
allow easier access to converters (#1610) 2022-06-08 13:34:01 -04:00
Pasqual Koschmieder
a0a5469988
Update to Minecraft 1.19 (#1601) 2022-06-07 21:24:31 -04:00
Photon-GitHub
240920d642
Diamond inference cleanup (#1593) 2022-05-25 23:30:08 -04:00
Pasqual Koschmieder
764195bd55
switch to a queue for queued scheduled packets (#1598) 2022-05-25 23:24:59 -04:00
Pasqual Koschmieder
073bfa2b86
Out/In bound protocol injection improvements (#1524)
* Clear up some stuff, fix location of wire packet encoder
* Ensure that the player injection cache is always up-to-date
* Make uninjection from a channel more reliable
* Don't schedule an empty runnable if there is no need to do that
* Remove unnecessary throw declarations from some methods
* Adjust uninjection to remove the injector reference as well
* improve channel future injection in network manager
2022-03-07 22:09:04 -05:00
Pasqual Koschmieder
1b4d79b302
Fix compile issues with the latest spigot version (#1510) 2022-02-24 16:18:56 -05:00
Dan Mulloy
95a884974a
Only set chat UUID if not already set
Fixes #1310
2021-07-08 23:33:17 -04:00
Dan Mulloy
153dd61994
Update to 1.17.1
Fixes #1315
2021-07-08 23:22:56 -04:00
Dan Mulloy
99504dab8f
Abstract out structure modifiers to allow internal structures to be read 2021-06-24 17:13:05 -04:00
Pasqual Koschmieder
90a38cc15c
Restore backwards compatibility (#1235)
* Remove usages of net.minecraft and craftbukkit
* Restore packet type backward compatibility (tested on 1.8)
* Re-add last removed packets
* Fix sub class naming for newer minecraft versions
2021-06-19 22:20:54 -04:00
Pasqual Koschmieder
0a32f24f08
Fix EntityUseAction & Hand read for minecraft 1.17 (#1230) 2021-06-18 10:47:48 -04:00
Dan Mulloy
9b54794f6b
Fix cloning in 1.17
Addresses #1222
2021-06-15 23:58:40 -04:00
Dan Mulloy
cc17b9ee6e
Finish up unit tests 2021-06-13 17:18:36 -04:00
Dan Mulloy
190ca1ff6a
Almost there, /theoretically/ 2021-06-13 15:57:23 -04:00
Dan Mulloy
c51930121f
Fix a bunch more classpaths
Also worked on fixing some wrappers
2021-06-13 11:36:44 -04:00
Dan Mulloy
c7a8d734d4
Fix some more class paths 2021-06-12 23:53:09 -04:00
Dan Mulloy
97972acee8
Add converter for game state ids
Fixes #1041
2021-02-27 15:38:05 -05:00
PimvanderLoos
b54dd49426
Replace CGLib with ByteBuddy (#984)
- The gclib dependency in the EnchancerFactory has been removed. All classes that used the actual factory part of it have been updated to use bytebuddy instead. This class will have to be removed at some point, but at the moment it is still used for accessing its class loader.
- Renamed EnhancerFactory to ByteBuddyFactory. All ByteBuddy actions should go through this now. Every subclass created here implements the ByteBuddyGenerated interface. This makes it possible to recognize classes generated using ByteBuddy (by default, it doesn't leave such a trace).
- Removed the method DefaultInstances#forEnhancer(Enhancer). This method isn't used anywhere; the last trace of usage of the method I could find was in 2013 (in the NetworkServerInjector). External plugins (I couldn't find any that used it), they should really have their own implementation, given that they already require an instance of an Enchancer. As such, I feel it is safe to remove rather than update it.
2021-01-04 00:24:34 -05:00
Dan Mulloy
bdaa843f2d
Update to 1.16.2
Fixes #941
Fixes #944
Fixes #934
2020-08-24 13:19:49 -04:00
Dan Mulloy
13f5c14599
Fix bytecode breakage with StructureModifier
Fixes #935
2020-08-24 11:40:47 -04:00
Dan Mulloy
12e3a895b3
Remove stray debug 2020-08-06 13:54:16 -04:00
Dan Mulloy
8c5fbe3298
Merge remote-tracking branch 'origin/master' 2020-08-04 19:04:22 -04:00
Dan Mulloy
0512215007
Add modifiers for world keys and moving block position
Fixes #906
Fixes #927
2020-08-04 19:03:59 -04:00
Tarrant
80f4c7b9a7
Support for MerchantRecipeList (#894)
* Added support for MerchantRecipeList found in OPEN_WINDOW_MERCHANT of MC versions 1.13+
2020-07-26 19:33:05 -04:00
Dan Mulloy
8c51b175c4
Merge remote-tracking branch 'origin/master' 2020-07-05 23:47:25 -04:00