76 Commits

Author SHA1 Message Date
Dylan K. Taylor
d5db163208 protocol: added proper object wrappers for gamerules 2020-06-20 11:24:39 +01:00
Dylan K. Taylor
11eb1f1c5e imports cleanup 2020-06-18 20:01:19 +01:00
Dylan K. Taylor
6f4d4be3da InGamePacketHandler: handle InvalidSkinException thrown by SkinAdapter::fromSkinData() 2020-06-17 22:31:44 +01:00
Dylan K. Taylor
e6a3f7baa2 Merge branch 'stable'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/Player.php
2020-06-17 22:23:17 +01:00
Dylan K. Taylor
715fca8986 LoginPacketHandler: use playerInfo directly again, fix another 2 PHPStan level 8 errors 2020-06-17 21:30:34 +01:00
Dylan K. Taylor
eefb6ae8e7 LoginPacketHandler: use reference to new PlayerInfo directly, fixes a PHPStan level 8 error 2020-06-17 21:29:16 +01:00
Dylan K. Taylor
503782d67c moved skin-parsing code from LoginPacketHandler to its own dedicated helper class 2020-06-17 21:24:12 +01:00
Dylan K. Taylor
8cabab20e3 Merge commit '09771849aefb70bc29202b160f65723cf926c974'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/network/mcpe/VerifyLoginTask.php
2020-06-17 21:10:59 +01:00
Dylan K. Taylor
3294075aad LoginPacketHandler: use double quotes consistently
the mixture of single quotes and double quotes makes PHPStan type inference quietly not work, and reports an error here in checkExplicitMixed mode.
2020-06-15 20:31:09 +01:00
Dylan K. Taylor
9ce531fef4 (master) imports cleanup 2020-06-14 19:29:33 +01:00
Dylan K. Taylor
465285b3c2 do not rely on GameMode::getMagicNumber() to match protocol IDs 2020-06-13 12:26:17 +01:00
Dylan K. Taylor
d2d4780653 Merge commit 'a3f633862'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/Player.php
2020-06-03 13:03:23 +01:00
Dylan K. Taylor
7d7c16b764 Merge commit '21aef97ba'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/Player.php
2020-06-03 13:00:31 +01:00
Dylan K. Taylor
01cbd27485 Merge commit 'd64561b0b'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/Player.php
2020-06-03 12:57:20 +01:00
Dylan K. Taylor
90b53149d7 Merge commit '5056754ce'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/Player.php
2020-06-03 12:54:00 +01:00
Dylan K. Taylor
544bcb8f12 Merge commit '0d4e473bd'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/Player.php
2020-06-03 12:45:28 +01:00
Dylan K. Taylor
899da1b7f7 Merge commit '42e14f749'
# Conflicts:
#	resources/vanilla
#	src/pocketmine/Player.php
#	src/pocketmine/item/Bow.php
#	src/world/World.php
2020-06-03 12:31:17 +01:00
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
3bb53658da Do not allow remote clients to spawn themselves before we're ready
this would have allowed clients to send SetLocalPlayerAsInitializedPacket at any time during the spawn sequence, which would have caused undefined behaviour around spawning logic.
2020-05-20 11:09:27 +01:00
Dylan K. Taylor
129a7c1b3e LoginPacketHandler: avoid trashing variables in foreach 2020-05-15 11:19:14 +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
36c5d9117d LoginPacketHandler: properly handle failure to base64_decode stuff from JWT
previously this might just return false and blow up in your face.
I considered fixing this on stable too, but it's less useful there because so much stuff on stable just explodes at the first wrong thing anyway.
2020-05-14 09:46:44 +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
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
a73c54bdd0 making tile spawn compound cache use CacheableNbt instead of strings 2020-05-04 12:35:13 +01:00
Dylan K. Taylor
d3dcb8a4e3 moving entity attack sounds to server-side 2020-05-04 11:50:42 +01:00
Dylan K. Taylor
8682ea35f7 Introduce some (not great) API for entity animations
while this API is a bit yucky, it's a step forward for protocol isolation and offers the possibility of controlling animations by adding events.
2020-05-01 13:57:26 +01:00
Dylan K. Taylor
2964a4be35 making BlockPunchSound server-controlled 2020-05-01 12:23:00 +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
adadd5423d move force-close crafting grid hack to InGamePacketHandler
the crafting transaction implementation has no business caring about this
2020-04-29 16:54:23 +01:00
Dylan K. Taylor
d1b28ce17a NetworkSession: allow sending an arbitrary set of attributes for an entity 2020-04-29 16:45:09 +01:00
Dylan K. Taylor
ad70a9e3dc NetworkSession: allow provision of a custom list of players to syncPlayerList() 2020-04-29 16:27:34 +01:00
Dylan K. Taylor
549940d8a7 remove NullPacketHandler
this is a waste of LOC
2020-04-29 13:14:23 +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
f9a587d40e imports cleanup 2020-04-28 17:27:38 +01:00
Dylan K. Taylor
3be9548b1e net: compressors are now fully dynamic (or at least the potential to be)
the compressor used by RakLibInterface when opening a session is still
hardcoded, but that's because we have no way to select the correct
compressor at that point in the login sequence, since we aren't
propagating the protocol information up from RakLib right now.
2020-04-28 16:21:18 +01:00
Dylan K. Taylor
a97cafd4f6 moving serializers into protocol namespace 2020-04-27 13:54:39 +01:00
Dylan K. Taylor
0397204c68 network/mcpe: imports cleanup 2020-04-27 12:56:28 +01:00
Dylan K. Taylor
80680f15f4 seal up resource pack completion callback visibility 2020-04-25 03:31:13 +01:00
Dylan K. Taylor
c869a7f099 HandshakePacketHandler no longer depends on NetworkSession 2020-04-24 23:18:29 +01:00
Dylan K. Taylor
ff915b829c StartGamePacket: remove hardcoded cache, move to RuntimeBlockMapping 2020-04-24 20:50:56 +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
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
35d656c6e5 ProcessLoginTask no longer depends on NetworkSession 2020-04-22 13:30:37 +01:00
Dylan K. Taylor
86e051b7bf Merge commit 'a2543ff80d2906bccda1a4e2fdbd9d8e7d147fb3' 2020-04-18 17:33:05 +01:00
Dylan K. Taylor
9bfc1df486 Merge branch 'stable' 2020-04-18 13:19:31 +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