202 Commits

Author SHA1 Message Date
Dylan K. Taylor
570a709059 Merge commit '3ec2994d7f05f30e2519430379ae0f3106be5074'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/Player.php
2020-05-20 19:52:03 +01:00
Dylan K. Taylor
486ce140d8 PacketBatch no longer extends NetworkBinaryStream
this removes a whole bunch of crap from its API that shouldn't have been exposed. In the future we should look at splitting this into reader/writer halves, but for now this is a step in the right direction.
2020-05-18 17:35:30 +01:00
Dylan K. Taylor
0e7a822553 Merge commit '25fb5140a2dba99c5e076849ac11e051a2970807' 2020-05-18 10:40:07 +01:00
Dylan K. Taylor
31e4fc6fcb fixing incompatible protocol handling, do not explode immediately on bad clientdata, login encode/decode is now symmetrical 2020-05-15 10:55:29 +01:00
Dylan K. Taylor
86db3af896 remove utils\Color, use new pocketmine/color class
we're so close to separating protocol from core !!!
2020-05-14 20:38:08 +01:00
Dylan K. Taylor
955b23cc8e Merge branch 'stable'
# Conflicts:
#	resources/vanilla
2020-05-14 00:23:36 +01:00
Dylan K. Taylor
84291e7980 Throw a more specific exception for JWT handling errors 2020-05-13 21:23:04 +01:00
Dylan K. Taylor
8c2878fe5b Added JwtUtils::parse(), make ProcessLoginTask more robust 2020-05-13 13:36:42 +01:00
Dylan K. Taylor
b7cf4f01f9 remove utils\UUID, switch to pocketmine/uuid package 2020-05-11 10:46:48 +01:00
Dylan K. Taylor
0b6d6306cf LoginPacket: fixed error handling edge case with malformed chain data JSON 2020-05-06 21:46:35 +01:00
Dylan K. Taylor
ed757c7207 consolidate some JWT handling into one class 2020-05-06 21:32:22 +01:00
Dylan K. Taylor
5d154e43a9 LoginPacket: removed an old hack that's no longer used 2020-05-06 21:18:05 +01:00
Dylan K. Taylor
a92580b993 StartGamePacket: remove unused imports 2020-05-06 21:14:57 +01:00
Dylan K. Taylor
acd37b95b8 Merge branch 'next-minor' 2020-05-06 20:41:48 +01:00
Dylan K. Taylor
b4606a4cd0 remove PM resource interaction from StartGamePacket
also lose the cache, because it's not very useful ...
2020-05-06 13:17:16 +01:00
Dylan K. Taylor
81f982a8d9 remove hardcoded legacy entity type ID mapping, load from resources instead 2020-05-04 13:47:39 +01:00
Dylan K. Taylor
fcd6a69000 cleaning up NBT handling on packet decode/encode
now we always decode, because it's not safe to assume that we can just grab the rest of the bytes in the packet.
2020-05-04 13:23:29 +01:00
Dylan K. Taylor
a73c54bdd0 making tile spawn compound cache use CacheableNbt instead of strings 2020-05-04 12:35:13 +01:00
Dylan K. Taylor
1969766b70 Nix some client-sided sounds, control them from the server
this is a necessary step to knock out the implicit assumption that every player is using the same protocol.
2020-05-01 11:52:32 +01:00
Dylan K. Taylor
f35b7bf80b NetworkBinaryStream: remove stale @throws from getAttributeList() 2020-04-29 16:32:56 +01:00
Dylan K. Taylor
b6214744d5 NetworkSession: inject PacketPool instead of hardcoding it
this will make it slightly easier for multi version implementations, but handlers are still quite a big problem.
2020-04-29 12:48:28 +01:00
Dylan K. Taylor
09e994a026 NetworkBinaryStream: swap BadPacketException for PacketDecodeException 2020-04-29 11:39:44 +01:00
Dylan K. Taylor
f6f1d31112 do not mess with cached data directly in packets 2020-04-29 11:34:25 +01:00
Dylan K. Taylor
a97cafd4f6 moving serializers into protocol namespace 2020-04-27 13:54:39 +01:00
Dylan K. Taylor
15c744b0d7 protocol: specialize exception used for bad packets 2020-04-27 12:55:00 +01:00
Dylan K. Taylor
45bed454f2 Merge commit '3d2ca45' 2020-04-25 12:14:45 +01:00
Dylan K. Taylor
ff915b829c StartGamePacket: remove hardcoded cache, move to RuntimeBlockMapping 2020-04-24 20:50:56 +01:00
Dylan K. Taylor
287bf4274f move RuntimeBlockMapping to convert package 2020-04-24 12:42:43 +01:00
Dylan K. Taylor
aa1828aa98 RuntimeBlockMapping is now a singleton instead of static class
this prepares for a fully dynamic block mapper, as well as allowing a small performance improvement to chunk encoding by eliding the constant lazy-init checks.
2020-04-23 21:09:58 +01:00
Dylan K. Taylor
f3fed60d57 crafting: ditch MultiRecipe, it's a network-only thing
MultiRecipes are really nothing more than feature toggles at the network layer, and they don't belong in the main core code.
2020-04-23 19:45:59 +01:00
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
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
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
093a7c239e CraftingDataPacket: fix variable name collision 2020-03-14 14:24:50 +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