Commit Graph

103 Commits

Author SHA1 Message Date
Lukas Alt
8fc5e509ae
Added factory method for initializing WrappedDataValue (#2523) 2023-08-26 15:49:11 -05:00
Tomescu Vlad-Costin
e219103a25
Added a null check for the optional converter (#2485) 2023-08-05 19:02:41 +00:00
RobotHanzo
2c48b1c019
Added support for dust color transition particles (#2455) 2023-07-02 16:49:29 -05:00
Lukas Alt
1537c7e236
Update to 1.20 (#2420) 2023-06-10 23:55:01 +00: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
Lukas Alt
339b2ef923
Ignore static fields in wrapper class for AutoWrapper (#2401) 2023-05-15 09:16:36 -04: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
Lukas Alt
448e9369de
JSON Parsing for WrappedServerPing and fixed modifying favicon (#2265)
* Fix WrappedServerPing access and ensure legacy compatability for JSON parsing
* added wrappers for mojang codecs and allow serializing server pings
2023-04-29 14:45:47 -05: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
Dan Mulloy
c7753a9d5b
Better server ping concurrency
Addresses #2289
2023-04-03 22:55:32 -04:00
libraryaddict
b51812655a
Correct the version from 1.19.4 to 1.19.3 (#2299) 2023-04-03 18:27:38 -05:00
libraryaddict
a910edc16b
Fix WrappedRegistry for versions older than 1.19.4 (#2298) 2023-04-03 11:27:12 -05:00
Dan Mulloy
fb2075b774
Fix exception for null sounds
Fixes #2276
2023-03-30 17:07:34 -05:00
Dan Mulloy
18c2b389a4
Improve unit tests for server ping 2023-03-26 13:58:46 -05:00
Dan Mulloy
1912a9c871
Fix setting ping player sample in 1.19.4 2023-03-26 13:31:39 -05:00
Dan Mulloy
0c6fa46871
Optimize class lookups 2023-03-25 23:16:04 -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
64e1e7de24
Fix some issues with server ping in 1.19.4 2023-03-23 20:23:10 -05:00
Dan Mulloy
05fa147b48
WIP: 1.19.4 update 2023-03-23 13:43:22 -05:00
armagidon-exception
365bb66d2a
Fixed backwards compatibility with WrappedDataValue (#2172) 2023-02-16 02:31:26 +00:00
Nassim Jahnke
bdbbb7cb9c
Fix SynchedEntityData$DataValue mapping (#2101)
Add SynchedEntityData$DataValue mapping
2023-01-13 19:56:51 -05:00
Dan Mulloy
531f28cbaf
Fix sounds in 1.19.3
Fixes #2049
2023-01-10 16:36:01 -05: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
Nassim Jahnke
b7c1e096c4
Support Mojang mapped servers (#1869) 2022-08-23 20:44:48 -04:00
Miklas
7fd4ec3172
Support for 1.18+ ClientboundLevelChunkWithLightPacket (#1592) 2022-08-06 18:52:42 -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
Photon-GitHub
a2bf242097
Cleanup (#1603)
* Replace guava Charsets with StandardCharsets.

* Use try-with-resources

* Faster Util asList, inline getOnlinePlayers.

* Use direct ArrayList allocation.

* Use new instead of Lists#...

* Use new instead of Lists#...

* Faster looping.

* Use switch.

* Remove diamond operators.

* Use ArrayDeque instead of LinkedList.

* Actually conform to the documentation and always use an ArrayList as backing list.

* Potentially breaking change: Use switch instead of startsWith as this e.g. causes "n" to be interpreted as "names" and any future new commands starting with "n" will be ignored.

* Use addAll().

* Remove IntegerSet. Unused and also covered by fastutils IntSet.

* Much faster boolean parsing. Might have breaking changes as parameterName is now checked after the false block.

* Make most fields final, fix JavaDoc and remove diamond operators.

* Make fields final.

* Much cleaner getAllInterfaces() method.

Co-authored-by: Dan Mulloy <dev@dmulloy2.net>
2022-06-25 11:32:42 -04:00
Pasqual Koschmieder
4e105c59ed
fix exceptions on older server versions (#1645) 2022-06-14 12:54:45 -04:00
Pasqual Koschmieder
e202503c09
allow setting if chat preview is enabled in WrappedServerPing (#1623) 2022-06-11 12:35:12 -04:00
Pasqual Koschmieder
aed98abac6
fix registration of parameterized registry types (#1628) 2022-06-11 12:32:59 -04:00
Pasqual Koschmieder
d7bf43001f
expand and document WrappedProfilePublicKey (#1618) 2022-06-11 11:58:08 -04:00
Pasqual Koschmieder
868b357527
add missing enum constants added in 1.19 (#1617) 2022-06-11 11:57:50 -04:00
Pasqual Koschmieder
374e6cd5ee
allow easier access to registries (#1613) 2022-06-08 16:32:52 -04:00
Pasqual Koschmieder
84a0b5ffdd
allow easier access to converters (#1610) 2022-06-08 13:34:01 -04:00
Pasqual Koschmieder
4cc3957723
bring back raw text component creation (#1612) 2022-06-08 13:33:07 -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
e44d1e6051
Improve auto wrapper handling (#1518) 2022-02-25 00:02:11 -05:00
Pasqual Koschmieder
40b6c66491
Update to minecraft 1.18 (#1446) 2021-11-30 14:10:03 -05:00
Dan Mulloy
dd687ce175
Fix NPE in PlayerInfoData equals
Fixes #1400
Closes #1106
2021-11-14 00:41:20 -05:00
Nassim Jahnke
8774d87d59
Add 1.17 long jump pose (#1409) 2021-11-13 23:51:37 -05:00