55 Commits

Author SHA1 Message Date
Dylan K. Taylor
5056754cea NetworkBinaryStream: do not round vectors directly on reading
fixes #3199
2020-05-31 20:17:42 +01:00
Dylan K. Taylor
84f99ed418 CommandOriginData: Rename previously unknown field 2020-05-20 13:00:03 +01:00
Dylan K. Taylor
fd63f19199 make use of new GameRuleType constants 2020-05-20 12:35:29 +01:00
Twisted
a107ad7404
1.14.60 support (#3407) 2020-04-17 09:18:00 +01:00
ナナチさん
a5ba570fdf
StructureBlockUpdatePacket: Added encode/decode (#3148) 2020-04-17 01:11:16 +01:00
Dylan K. Taylor
6a507bb149 further CS fixes 2020-03-10 12:18:16 +00:00
Dylan K. Taylor
93597dcd50 SkinData: fixed loss of data from packet decode 2020-02-24 20:48:03 +00:00
Dylan K. Taylor
da3742b39e Remove useless typecasts 2020-02-06 16:00:57 +00:00
Dylan K. Taylor
e5a2cfb65f avoid type juggling in conditions, always use explicit boolean conditions 2020-02-05 15:44:06 +00:00
Dylan K. Taylor
260ac47588 add some phpstan array types 2020-01-30 22:23:11 +00:00
Dylan K. Taylor
fc0619ee6e populate missing array value types in network namespace 2020-01-30 21:12:00 +00:00
Dylan K. Taylor
f624871b3f strip extra blank lines (php-cs-fixer) 2020-01-22 14:50:29 +00:00
Dylan K. Taylor
c4793241f5 Mass removal of useless @param/@return PHPDoc annotations, pass 1 2020-01-21 15:10:18 +00:00
Dylan K. Taylor
b42966f61b network: explicitly specify @return void 2020-01-18 19:35:01 +00:00
Dylan K. Taylor
8794292788 remove &$var reference notations in phpdoc
this isn't required by the spec and PHPStan chokes on it. I was previously having it ignore these errors, but it turns out that PHPStan is not making use of extended typeinfo provided if it can't parse the tag, which is problematic on level 6 and also a problem for array-of-type. Therefore, we are going to have to take the hit.
2020-01-11 21:20:55 +00:00
Dylan K. Taylor
50a4c42f3f NetworkBinaryStream: fix misplaced import 2019-12-09 19:53:32 +00:00
Stephen
e38c0c0fe1 Merge remote-tracking branch 'upstream/stable' into stable 2019-12-01 21:55:50 -05:00
Dylan K. Taylor
163ed225f2 NetworkBinaryStream: fixed crash when non-compound root tag is provided for itemstack 2019-12-01 18:41:02 +00:00
Stephen
4340349db7 Generate getters for SkinData, applied suggested change, and fixed an underfined variable in PlayerListPacket 2019-11-21 13:52:27 -05:00
Stephen
be9c413a9e Added network components for skins, to collect instead of throw out data 2019-11-20 21:43:41 -05:00
Dylan K. Taylor
10d44292e1 fix classic capes 2019-11-12 12:27:50 -05:00
Dylan K. Taylor
ead572fab9 fix skin sharing stupidity 2019-11-12 07:08:48 -05:00
Stephen
5bcbef90ea Added variables for getSkin's animation for easier readability 2019-11-11 15:32:48 -05:00
Stephen
1c67f094e3 Change get and put SkinImage visibility to private 2019-11-11 15:29:57 -05:00
Stephen
7b152def7d Move SkinAnimation and changed SerializedImage to SkinImage
Also change putImage and getImage to getSkinImage and putSkinImage
2019-11-11 15:23:48 -05:00
Dylan K. Taylor
8ee0fbccc5 Merge branch 'stable' of https://github.com/drew-mcbe/pocketmine-mp into drew-1.13 2019-11-11 05:48:17 -05:00
Stephen
e2fc7cdf88 Friendly BC skins (persona not supported) 2019-11-10 21:04:38 -05:00
Dylan K. Taylor
5a76c38363 Merge remote-tracking branch 'origin/stable' into drew-1.13 2019-11-10 17:02:46 -05:00
Dylan K. Taylor
95812252d6 NetworkBinaryStream: fix a mistake in doc for putEntityRuntimeId() 2019-11-07 18:22:37 +00:00
Stephen
5b11ddee35 Clean up duplicated skin entries 2019-11-05 20:30:41 -05:00
Drew
cd2b60a860 Initial update to 1.13 2019-10-30 21:36:08 -04:00
Ivan
aeeee5eb53 Added encode/decode for StructureTemplateDataExport(Request|Response)Packet (#3145) 2019-10-14 11:14:42 +01:00
Dylan K. Taylor
807b860cfe protocol: fixup data type changes, closes #3072 2019-08-11 19:02:16 +01:00
Dylan K. Taylor
a883c35fd0 clean up yesterday's mess 2019-07-13 18:15:14 +01:00
Dylan K. Taylor
c58a1bf9b7 Protocol changes for 1.12.0.28 2019-07-12 19:00:15 +01:00
Dylan K. Taylor
8fcb44de7d Merge branch '3.6' into 3.7 2019-03-29 19:55:36 +00:00
Dylan K. Taylor
f4480c07ee Updated NBT dependency 2019-03-29 19:47:15 +00:00
Dylan K. Taylor
cce99b07af 1.10.0 updates 2019-03-20 19:17:41 +00:00
Dylan K. Taylor
faca610594 NetworkBinaryStream: remove dead field 2019-03-03 12:38:03 +00:00
Dylan K. Taylor
b8703d5dff Protocol changes for 1.9.0 2019-02-07 21:56:42 +00:00
Dylan K. Taylor
cb591a98f4 NetworkBinaryStream: Skip item NBT which is too large when encoded
Encoded tags larger than 32KB overflow the length field, so we can't send these over network. However, it's unreasonable to randomly throw this burden off onto users by crashing their servers, so the next best solution is to just not send the NBT. This is also not an ideal solution (books and the like with too-large tags won't work on the client side) but it's better than crashing the server or client due to a protocol bug. Mojang have confirmed this will be resolved by a future MCPE release, so we'll just work around this problem until then.
2019-01-16 21:50:43 +00:00
Dylan K. Taylor
4b9a142a5d Import global functions and constants for enhanced performance
This is better for performance because these then don't need to be reevaluated every time they are called.

When encountering an unqualified function or constant reference, PHP will first try to locate a symbol in the current namespace by that name, and then fall back to the global namespace.
This short-circuits the check, which has substantial performance effects in some cases - in particular, ord(), chr() and strlen() show ~1500x faster calls when they are fully qualified.

However, this doesn't mean that PM is getting a massive amount faster. In real world terms, this translates to about 10-15% performance improvement.
But before anyone gets excited, you should know that the CodeOptimizer in the PreProcessor repo has been applying fully-qualified symbol optimizations to Jenkins builds for years, which is one of the reasons why Jenkins builds have better performance than home-built or source installations.
We're choosing to do this for the sake of future SafePHP integration and also to be able to get rid of the buggy CodeOptimizer, so that phar and source are more consistent.
2019-01-04 20:43:15 +00:00
Dylan K. Taylor
9b820a0849 Guard against possible overflow bug in NetworkBinaryStream 2018-10-26 20:08:48 +01:00
Dylan K. Taylor
86c27953ec NetworkBinaryStream: bail on unknown entity data types 2018-05-22 16:44:03 +01:00
Dylan K. Taylor
58279d4cfe NetworkBinaryStream: fixed not decoding items with negative IDs correctly
negative IDs are used for new block-items.
2018-04-11 13:01:41 +01:00
Dylan K. Taylor
7fb237938c EntityLink: rename unknown field
close #1465
2018-04-07 11:35:35 +01:00
Dylan K. Taylor
eba1ca030c Fix variadic type docs ...again
PhpStorm changed its mind how it wants these documenting in 2018.1, and apparently the correct syntax follows the PHP code.
2018-04-02 12:33:24 +01:00
Dylan K. Taylor
49622cc2a5 NetworkBinaryStream: simplify read of canPlaceOn and canDestroy lists 2018-03-30 11:07:29 +01:00
Dylan K. Taylor
ac5a91b67e Cleaned up bool comparison mess 2018-03-19 14:10:55 +00:00
Dylan K. Taylor
6a94c8183c NetworkBinaryStream: Add clarification on array structure for gamerules
we need objects for this really
2018-02-28 18:10:47 +00:00