Commit Graph

1584 Commits

Author SHA1 Message Date
LOOHP
d83dd9ab8a
Get around expensive validate calls (#2318) 2023-04-09 16:40:57 -05:00
Pasqual Koschmieder
ab32f938d7
resolve packet instance construction concurrency issue (#2312) 2023-04-07 20:57:49 -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
4b78bf6a34
Update dependencies to support Java 20
Fixes #2274
Fixes #2270
Fixes #2251
2023-03-28 12:40:32 -05:00
libraryaddict
edce5b6d0f
Fix /packet arguments, fixes #1847 (#2271)
Pretty simple, it's deleting the argument twice. Which means you have to use `/packet add add <remaining>`
2023-03-27 22:03:27 -05:00
Dan Mulloy
7217b11ba7
Fix reading class aliases
Fixes #2263
2023-03-26 14:09:45 -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
Dan Mulloy
df3b68df4c
Some cleanup
Fixes super critical issue #2255
2023-03-25 21:45:29 -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
libraryaddict
bba534d694
Fix listeners removing each other (#2236) 2023-03-16 16:52:10 -05:00
Aseeef
4f0fe72add
Use ConcurrentHashMap to improve performance (#2226)
* modified hashset collections for small performance gains

* reverted load factor modification since no noticeable performance gain was seen

---------

Co-authored-by: aseef <contact@aseef.dev>
2023-03-12 13:05:19 -05:00
armagidon-exception
365bb66d2a
Fixed backwards compatibility with WrappedDataValue (#2172) 2023-02-16 02:31:26 +00:00
Richy
0a41cf9353
Add a soft-cache to getFields method (#2152)
* Added a soft-cache to getFields method

* Added cache purge on cache miss
2023-02-15 21:28:02 -05:00
Lennart Lösche
d0b274249c
Print exception in MethodHandleHelper (#2097)
print exception caused by xyz
2023-01-14 01:00:56 +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
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
Elioby
9d183e85d7
Force login disconnect packet to be run async (#2021) 2022-12-18 15:32:45 +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
lennoxlotl
86e586da26
Fix not being able to read effects from RemoveEntityEffect packet (#1908)
fix being unable to read from RemoveEntityEffect due to wrong alias order
2022-11-26 22:54:33 +00:00
Nassim Jahnke
069783a353
Fix getEntityClass full qualifier (#1967) 2022-11-26 17:49:35 -05:00
opl-
cc95e19ba4
Fix Magma support (#1953)
Tested with Magma v1.16.5 and Paper v1.18.2
2022-11-25 15:13:33 -05:00
Pasqual Koschmieder
c31133c20f
Improve performance by removing hash computations of packets (#1933) 2022-10-16 20:31:42 +00:00
caoli5288
69ae3656b5
Fix StreamSerializer backwards compatibility (#1868)
Fixes #1813
2022-10-16 18:37:08 +00:00
Pasqual Koschmieder
43145bd478
cleanup MonitorAdapter (#1831) 2022-08-24 00:53:55 +00:00
Nassim Jahnke
b7c1e096c4
Support Mojang mapped servers (#1869) 2022-08-23 20:44:48 -04:00
Pasqual Koschmieder
6707c4811e
only run inbound listeners on the main thread if requested (#1851) 2022-08-16 23:51:54 -04:00
Rodney
2092b8f48e
Make getRandomKey() properly random (#1834) 2022-08-13 15:08:01 +00:00
Pasqual Koschmieder
20e73369fa
mark some critical packets as forced-async (#1840) 2022-08-13 11:04:17 -04:00
Pasqual Koschmieder
abc0db8281
remove off-event-loop logic from inbound packet listeners (#1836) 2022-08-12 17:29:07 -04:00
Pasqual Koschmieder
1beb95115f
Improve cloning tests (#1822) 2022-08-12 02:07:38 +00:00
Pasqual Koschmieder
7fcfcdc365
fix fix of fix of getEntityFromId (#1827) 2022-08-11 22:04:27 -04:00
Pasqual Koschmieder
2be216899a
use correct packet for chat extensions on 1.19+ (#1824) 2022-08-10 20:59:03 +00:00
Pasqual Koschmieder
8876ce323b
add support for sync & async receiving listeners (#1815) 2022-08-10 20:50:33 +00:00
Pasqual Koschmieder
575174580e
Small update for 1.19.2 (#1814) 2022-08-10 16:49:01 -04:00
Miklas
7fd4ec3172
Support for 1.18+ ClientboundLevelChunkWithLightPacket (#1592) 2022-08-06 18:52:42 -04:00
Pasqual Koschmieder
a75d383001
fix injection exception when plugin is disabled (#1798) 2022-08-02 20:59:33 -04:00
Pasqual Koschmieder
7ddfd4f347
Fix & improve PacketContainer serialization & cloning (#1794) 2022-07-31 11:54:26 -04:00
Pasqual Koschmieder
7e137cbfc5
dependency updates (#1790) 2022-07-30 20:01:11 -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
Snowiiii
ae19478007
Updated Dependencies (#1769) 2022-07-26 17:31:58 +00:00
games647
11a8184c3e
Add StructureModifier for extracting the signature data in chat and login packets (#1742) 2022-07-26 13:29:34 -04:00