789 Commits

Author SHA1 Message Date
Dylan K. Taylor
095a21ea5a PacketPool is now non-static
this allows greater flexibility for customisation, and will facilitate future multi version support.
2020-04-23 16:11:47 +01:00
Dylan K. Taylor
f3d7c320a1 move SkinAdapter stuff to convert package 2020-04-23 15:46:37 +01:00
Dylan K. Taylor
ebcfab4b61 NetworkInventoryAction: move type translation to TypeConverter 2020-04-23 15:40:23 +01:00
Dylan K. Taylor
33f899f2fc protocol: imports cleanup 2020-04-23 15:38:17 +01:00
Dylan K. Taylor
1b26cf1df9 break the hard cycle between mcpe\handler and mcpe\protocol
preparing to move mcpe\protocol to a separate library
2020-04-23 15:38:11 +01:00
Dylan K. Taylor
18d48869a0 the great airgapping of recipes and itemstacks 2020-04-23 14:11:48 +01:00
Dylan K. Taylor
843993f02b Throw a specific exception for zlib decompression failure 2020-04-22 13:45:29 +01:00
Dylan K. Taylor
35d656c6e5 ProcessLoginTask no longer depends on NetworkSession 2020-04-22 13:30:37 +01:00
Dylan K. Taylor
dd37d286f0 use a dedicated exception class for throwing exceptions on decrypt failure 2020-04-22 09:40:26 +01:00
Dylan K. Taylor
c6d6afe65e bring RakLibInterface up to speed with latest RakLib 2020-04-19 12:27:44 +01:00
Dylan K. Taylor
86e051b7bf Merge commit 'a2543ff80d2906bccda1a4e2fdbd9d8e7d147fb3' 2020-04-18 17:33:05 +01:00
Dylan K. Taylor
49a71ff4f8 Merge commit '6422ed7'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/network/mcpe/RakLibInterface.php
2020-04-18 13:55:35 +01:00
Dylan K. Taylor
9bfc1df486 Merge branch 'stable' 2020-04-18 13:19:31 +01:00
Dylan K. Taylor
ab62a792e1 Merge commit '7a072931d' 2020-04-18 12:10:02 +01:00
Dylan K. Taylor
3d3a487422 PrepareEncryptionTask: remove cyclic dependency on NetworkSession 2020-04-18 11:25:29 +01:00
Dylan K. Taylor
e86c243db5 NetworkSession: do not expose setPlayerInfo() 2020-04-16 01:55:52 +01:00
Dylan K. Taylor
9ba47f90d1 LoginPacketHandler: account for failure to correctly parse UUID
this will still crash in some circumstances, pending merging bug fixes from stable.
2020-04-16 01:45:00 +01:00
Dylan K. Taylor
d3a6da1b3a NetworkSession->getPing() now returns null when no measurement of ping has yet been completed 2020-04-04 23:33:30 +01:00
Dylan K. Taylor
f5bf93455a update to latest RakLib 2020-04-01 20:16:21 +01:00
Dylan K. Taylor
64d5320ac9 update for pthreads-free raklib 2020-03-31 19:41:37 +01:00
Dylan K. Taylor
00cc2ee092 one more RakLib update for the day ... 2020-03-30 00:22:45 +01:00
Dylan K. Taylor
927872ce08 Updated to latest bleeding-edge RakLib 2020-03-29 23:53:00 +01:00
Dylan K. Taylor
abd1ed7352 RakLibServer: make onRun() protected 2020-03-29 18:45:48 +01:00
Dylan K. Taylor
d89cdfc18e Relieve RakLibServer of more responsibilities
at this point it's really not much more than just a thread-safe way to transmit parameters from main to thread. Maybe we can ditch it in favour of a generic closure-based thread implementation.
2020-03-29 18:42:15 +01:00
Dylan K. Taylor
4e54e54421 Updated RakLib dependency 2020-03-29 18:18:39 +01:00
Dylan K. Taylor
f779881b6a Updated to latest RakLib bleeding edge
this version brings quite a few inter-thread communication improvements.
2020-03-29 16:52:36 +01:00
Dylan K. Taylor
eb7c31d3ff RakLibInterface: remove useless shutdown check from tick()
the thread should never be shutdown during an update cycle, because we stop the interface from being ticked when it gets shutdown.
2020-03-29 16:26:22 +01:00
Dylan K. Taylor
0691a40204 UpdateBlockPropertiesPacket: expose nbt field 2020-03-24 11:06:58 +00:00
Dylan K. Taylor
da7ff9b1fe Airgap Attribute, fix decoding of non-registered attributes for protocol debugging 2020-03-24 00:43:44 +00:00
Dylan K. Taylor
83a3adecff LoginPacket: use netresearch/jsonmapper for login data decoding
this makes retrieval static analysis friendly without extra steps.
2020-03-23 22:00:13 +00:00
Dylan K. Taylor
3e5d3a646b Make use of BadPacketException::wrap() 2020-03-23 21:28:38 +00:00
Dylan K. Taylor
2d46ae4476 Added BadPacketException::wrap() 2020-03-23 21:27:08 +00:00
Dylan K. Taylor
d930abce2d ChunkSerializer: improve palette writing performance with one weird trick
this optimization relies on the fact that palette entries are always unsigned, and positive zigzag varints are just the same as their non-zigzag counterparts, except shifted left by 1 bit. This eliminates some function call overhead, making the encoding slightly less agonizingly slow.
2020-03-17 21:16:43 +00:00
Dylan K. Taylor
093a7c239e CraftingDataPacket: fix variable name collision 2020-03-14 14:24:50 +00:00
Dylan K. Taylor
c9e8598510 InGamePacketHandler: do not handle inbound ActorEvents that are not for self 2020-03-13 15:19:32 +00:00
Dylan K. Taylor
899d05c6ec DataPacket: strip some whitespace 2020-03-10 13:06:16 +00:00
Dylan K. Taylor
ca909ebc1d Merge branch 'next-minor' 2020-03-10 13:05:37 +00:00
Dylan K. Taylor
b4b1877ce5 Merge branch 'next-minor' 2020-03-09 14:38:15 +00:00
Dylan K. Taylor
6e39e34c1e Merge branch 'stable' 2020-03-03 12:35:11 +00:00
Dylan K. Taylor
5c2ae0257c DataPacket: inject buffer via parameter instead of class field (packet & stream separation, step 2)
this is not complete yet, but the final change (having the binarystream actually come from outside) is a little more disruptive, and some extra changes need to be made. This will grant some sanity in the meantime without breaking too much stuff.
2020-02-25 16:19:11 +00:00
Dylan K. Taylor
bd00ee5038 Merge branch 'stable' 2020-02-24 22:11:13 +00:00
Dylan K. Taylor
8a770d837e Merge branch 'stable' 2020-02-24 20:32:43 +00:00
Dylan K. Taylor
ce0af8b040 DataPacket now encapsulates NetworkBinaryStream instead of extending it
ultimately the goal is to remove the NetworkBinaryStream crap entirely, but this change has most of the same benefits and is less disruptive.
2020-02-24 18:59:54 +00:00
Dylan K. Taylor
36685001bd ContainerOpenPacket: fixed entityInv() not initializing x/y/z fields
these are written even when not used, so they have to be initialized.
2020-02-23 20:59:53 +00:00
Dylan K. Taylor
95eddbdd74 InventoryManager: move add/remove logic to separate functions 2020-02-12 17:36:29 +00:00
Dylan K. Taylor
55e3b9ed91 InventoryManager: avoid feedback loop when closing inventory 2020-02-12 16:35:57 +00:00
Dylan K. Taylor
4014f9a4f2 InventoryManager: be aware of client-side state when syncing slots
this eliminates feedback loops during client-initiated slot changes, and also makes it possible to have a SlotChangeAction anonymous from its initiator.
2020-02-11 21:12:18 +00:00
Dylan K. Taylor
7ad44d8403 ChunkRequestTask: do not copy light information when sending chunks 2020-02-09 17:49:15 +00:00
Dylan K. Taylor
ce42ca958e InGamePacketHandler: do not execute use-item action if already using item, fixes #3246
the useHeldItem() sets the using-item flag back to true immediately after consumeHeldItem() sets it to false, which caused this bug.
stable has the same problem, but the effects don't show due to a well timed MobEquipmentPacket (a happy accident).
2020-02-09 12:13:15 +00:00
Dylan K. Taylor
bfdfa4184b Merge branch 'stable' 2020-02-08 09:33:56 +00:00