Dylan K. Taylor
82b3e3398b
make more use of igbinary_serialize() and igbinary_unserialize()
2020-06-17 23:03:03 +01:00
Dylan K. Taylor
6f4d4be3da
InGamePacketHandler: handle InvalidSkinException thrown by SkinAdapter::fromSkinData()
2020-06-17 22:31:44 +01:00
Dylan K. Taylor
05615b3eb7
ClientDataToSkinDataHelper: move safeB64Decode to its own function
2020-06-17 22:27:13 +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
77c71e22b2
SkinAdapter::fromSkinData() may now throw InvalidSkinException
...
fixes a rogue TODO in LegacySkinAdapter and invalid skins maybe showing up as Steve instead of getting kicked off the server
2020-06-17 21:44:22 +01:00
Dylan K. Taylor
a686840e5e
RuntimeBlockMapping: fixed palette cache never being initialized
...
I must have been very tired when I wrote this code
2020-06-17 21:33:56 +01:00
Dylan K. Taylor
333ed8ed2f
RuntimeBlockMapping: remove unnecessary nullable flag
2020-06-17 21:32:51 +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
7558f2cb12
regenerated phpstan level 8 baseline
2020-06-17 21:27:51 +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
55e6b2dfbc
Merge commit '1c13ba565660e0985c08f2c6b59e26f8216f87e4'
...
# Conflicts:
# resources/vanilla
# src/network/mcpe/protocol/serializer/PacketSerializer.php
2020-06-17 21:14:04 +01:00
Dylan K. Taylor
5c94c6992d
Merge commit 'f970be0e4ddf90e64c2e87cc6b2123aa933b3ab1'
...
# Conflicts:
# resources/vanilla
2020-06-17 21:12:46 +01:00
Dylan K. Taylor
6a8bb89734
Merge commit '11a3f9f1b906d0a73adb5a81a6eff120b56cf6fa'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/network/mcpe/VerifyLoginTask.php
2020-06-17 21:12:27 +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
543023793c
Merge commit '57a310230acd8b13e96fa4f24dbdabb19927b483'
...
# Conflicts:
# resources/vanilla
2020-06-17 21:04:23 +01:00
Dylan K. Taylor
d58ea80dca
Merge commit '130c55d9f1c3b350c2767f7656366e08a63cf1ad'
...
# Conflicts:
# resources/vanilla
# src/network/mcpe/protocol/serializer/PacketSerializer.php
# src/network/mcpe/protocol/types/entity/EntityLink.php
# tests/phpstan/configs/l8-baseline.neon
2020-06-17 21:03:45 +01:00
Dylan K. Taylor
1c13ba5656
Avoid parameter ordering bugs during packet decoding
...
A PhpStorm refactor could have side effects on code that directly reads stuff from the packet input stream in the arguments block, because those calls will get moved into a different order if the constructor gets refactored. This would, obviously, break packet decoding, so that's something we should avoid and really should not encourage.
2020-06-17 21:01:01 +01:00
Dylan K. Taylor
7c79a28fdb
Merge commit '2712befa82dc92fe26d2b913a47200ad84927799'
...
# Conflicts:
# resources/vanilla
# tests/phpstan/configs/l8-baseline.neon
2020-06-17 20:49:46 +01:00
Dylan K. Taylor
fb059cda69
Merge commit 'a4e250a3e61cbf1e75fe2785e71158f16a4a9039'
...
# Conflicts:
# resources/vanilla
2020-06-17 20:48:19 +01:00
Dylan K. Taylor
8d537eaae8
Merge commit '23b97d8e2dca50cca77061c1080911ab610fa708'
...
# Conflicts:
# resources/vanilla
# tests/phpstan/configs/l8-baseline.neon
2020-06-17 20:47:51 +01:00
Dylan K. Taylor
f1fd8a13e9
Merge commit '1fb5043eb1b495e6926caecf3fb493837724c770'
...
# Conflicts:
# resources/vanilla
# tests/phpstan/configs/l8-baseline.neon
2020-06-17 20:46:18 +01:00
Dylan K. Taylor
d310c8b782
Merge commit 'b0b1b29de4d4cbf60ca54d9043f01c9b2b21f136'
2020-06-17 20:44:32 +01:00
Dylan K. Taylor
7e6a7d4611
Merge commit '1c3b641e37471833523f50f818571f25f85a52f9'
2020-06-17 20:43:57 +01:00
Dylan K. Taylor
a2677eba02
Merge commit 'f3063e797fab56ff8d0213c8e5a3904085a6eb79'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/level/format/io/ChunkUtils.php
2020-06-17 20:43:30 +01:00
Dylan K. Taylor
d2130265f8
Merge commit '8dcc88712c6b8a4d4a0c6be2f6b908ae85378209'
...
# Conflicts:
# resources/vanilla
# src/pocketmine/level/format/io/ChunkUtils.php
# tests/phpstan/configs/l7-baseline.neon
2020-06-17 20:42:28 +01:00
Dylan K. Taylor
921aa091e0
Merge commit '04191ec44a00dd058f5d7e9e315d451e44285494'
...
# Conflicts:
# resources/vanilla
# tests/phpstan/configs/l7-baseline.neon
2020-06-17 20:40:12 +01:00
Dylan K. Taylor
14d3e5ce27
Merge commit '62ea7c93a9ba1e71bef868efefdd9cc6dcc84a08'
...
# Conflicts:
# resources/vanilla
# src/entity/Skin.php
# src/item/InvalidSkinException.php
2020-06-17 20:34:19 +01:00
Dylan K. Taylor
f970be0e4d
SkinImage: 128x64 is not a valid classic skin size
...
MC itself doesn't accept classic skins of this size.
2020-06-17 20:31:28 +01:00
Dylan K. Taylor
09909f7af8
Merge commit 'cf06b5b8cffb4ee3a4c1e88b7be9e35fca74a89e'
2020-06-17 19:20:53 +01:00
Dylan K. Taylor
6d63c9bf43
Merge commit 'a8ec51daacaef9113b17e3fc79c0bdcaf1c99df9'
2020-06-17 19:20:30 +01:00
Dylan K. Taylor
57908586bd
more jsonmapper models for login
2020-06-17 19:10:27 +01:00
Dylan K. Taylor
11a3f9f1b9
VerifyLoginTask: fast-fail by checking header x5u before verifying signature
...
this is less costly, although it doesn't make any difference except in invalid cases.
2020-06-17 17:52:19 +01:00
Dylan K. Taylor
09771849ae
VerifyLoginTask optimisation: do not copy the entire LoginPacket into the worker thread
...
this is especially bad considering the fact that the cached buffer is copied. That said, it's only a few kilobytes so it's not a huge problem, but nonetheless...
2020-06-17 17:46:22 +01:00
Dylan K. Taylor
4bb93eeca7
updated composer dependencies
2020-06-17 14:32:57 +01:00
Dylan K. Taylor
506f98efc4
Eliminate usages of BaseNbtSerializer->readCompressed() and BaseNbtSerializer->writeCompressed()
2020-06-17 14:31:56 +01:00
Dylan K. Taylor
3cdf808da1
NetworkNbtSerializer: do not assume that this format is related to the disk little-endian format
2020-06-17 13:55:29 +01:00
Dylan K. Taylor
76e15016a2
updated composer dependencies
2020-06-17 13:51:14 +01:00
Dylan K. Taylor
c618932d25
Eliminate usages of BinaryStream->setBuffer() and BinaryStream->reset()
2020-06-17 13:49:43 +01:00
Dylan K. Taylor
893f7cb6ef
fix crash whn player joins in spectator mode
2020-06-17 12:39:54 +01:00
Dylan K. Taylor
9c46a1f141
Rename Packet->getBinaryStream() -> Packet->getSerializer()
2020-06-17 11:33:59 +01:00
Dylan K. Taylor
6c096c44aa
Rename NetworkBinaryStream -> PacketSerializer
2020-06-17 11:31:13 +01:00
Dylan K. Taylor
c6557f0222
protocol: added a FixedItemIds class (this is fully auto-generated, unlike the one provided by the API)
...
this may be different from the IDs exposed on the API and shouldn't be used for anything outside the protocol.
TODO: we need to review the dynamicness of item numeric IDs and find out if it's possible for them to change based on StartGamePacket content. If they can, we might need to change this.
2020-06-17 11:06:26 +01:00
Dylan K. Taylor
57a310230a
ScoreboardIdentityPacketEntry: added missing field default
2020-06-15 23:59:53 +01:00
Dylan K. Taylor
130c55d9f1
EntityLink: remove rogue default ctor parameters
2020-06-15 23:58:11 +01:00
Dylan K. Taylor
2712befa82
SkinData: fixed capeImage type violation (doesn't accept null)
2020-06-15 23:51:48 +01:00
Dylan K. Taylor
a4e250a3e6
TextFormat: improved exception messages for PCRE failures
2020-06-15 23:43:01 +01:00
Dylan K. Taylor
23b97d8e2d
TextFormat: wrap all preg_replace() usages in a type-safe exception-throwing version
...
fixes 3 phpstan level 8 errors
2020-06-15 23:31:46 +01:00
Dylan K. Taylor
1fb5043eb1
build/server-phar: fixed a phpstan level 8 error
2020-06-15 23:16:40 +01:00
Dylan K. Taylor
b0b1b29de4
Chunk: specify list<int> for heightMap
2020-06-15 23:07:35 +01:00