1008 Commits

Author SHA1 Message Date
Dylan K. Taylor
17720041a3 phpdoc: populate missing parameter typeinfo 2020-01-11 21:53:24 +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
e1e1bfa5e3 CompressBatchedTask: remove useless code causing build failure
assuming that pthreads does not have leak issues, this code is pointless, and if pthreads does have leak issues, this may not prevent them anyway.
2020-01-09 14:19:35 +00:00
Dylan K. Taylor
1eedac87b2 added missing @var property types (reported by phpstan) 2020-01-09 14:13:54 +00:00
Dylan K. Taylor
4794ba236a Revert "resource packs: added new option remove_client_resources, fixed client packs being removed when forcing resource pack download"
This reverts commit 06ec8b83978fcc52a7964d678a97c73b50a97aa8.

unfortunately, this had some unanticipated side effects, thanks to
idiotic behaviour in the client ... when having optional downloads but
trying to force resources, the client chokes because it thinks the
server is forcing it to apply a pack that it doesn't have. Since
there's no way to detect when this problem occurs in the protocol, the
only option is to revert this.
2020-01-04 16:04:07 +00:00
Dylan K. Taylor
06ec8b8397 resource packs: added new option remove_client_resources, fixed client packs being removed when forcing resource pack download 2020-01-04 13:16:47 +00:00
Luke
216138a37e
PlayerAuthInputPacket: Fix assigning variable in static context 2019-12-17 22:04:24 +08:00
Dylan K. Taylor
911b6feaf9 NetworkInventoryAction: remove dead code
the trading & beacon types need to be checked as well, but I don't have the tools to check that right now.
2019-12-17 11:17:40 +00:00
Dylan K. Taylor
f7d66613df CompletedUsingItemPacket: added missing #include, closes #3219 2019-12-13 19:50:40 +00:00
Dylan K. Taylor
f39fc7e525 CompressBatchedTask::__construct() accepts Player[] not string[] 2019-12-12 16:16:48 +00:00
Dylan K. Taylor
dbca36e5e2 SkinImage: throw on wrong data length 2019-12-11 22:45:14 +00:00
Dylan K. Taylor
e6c3b0fc0d Changes for 1.14
there are no protocol changes in 1.14 that matter; the reason the protocol version has been bumped is because of new blocks, items, mobs and recipes.
2019-12-11 18:32:22 +00:00
Dylan K. Taylor
9568364277 fix minor formatting issue in SkinAdapterSingleton 2019-12-09 21:19:15 +00:00
Dylan K. Taylor
f00c69c513 added missing function imports 2019-12-09 20:13:02 +00:00
Dylan K. Taylor
50a4c42f3f NetworkBinaryStream: fix misplaced import 2019-12-09 19:53:32 +00:00
Dylan K. Taylor
6b61efcfc8 remove unused imports 2019-12-09 19:49:21 +00:00
Dylan K. Taylor
1a99938e4b LegacySkinAdapter: clean up nonsensical code ordering 2019-12-09 18:26:20 +00:00
Dylan K. Taylor
a4d68fb32b LegacySkinAdapter: fix some wacky cape handling logic
I added checks for length validity locally and ran into some interesting behaviour because of this code.
2019-12-09 18:16:46 +00:00
Dylan K. Taylor
733d530ed0 fixing EOF newlines on new files 2019-12-07 10:08:29 +00:00
Dylan K. Taylor
c10ce84035 fix invisible legacy skins which have empty geometry names 2019-12-07 10:02:22 +00:00
Dylan K. Taylor
394c999710 Merge branch 'drew-1.13' into stable 2019-12-06 20:38:49 +00:00
Dylan K. Taylor
b6bbf655d7 InventoryTransactionPacket: fixed crafting flags being set on useless empty transactions
this fixes some misleading debug noise when getting stuff from creative inventory and triggers some different spam instead.
2019-12-06 20:08:09 +00:00
Dylan K. Taylor
3d2c018442 BiomeDefinitionListPacket: load pregenerated data from file 2019-12-06 11:32:33 +00:00
Dylan K. Taylor
da8c54cf8b AvailableEntityIdentifiersPacket: load pregenerated data from file 2019-12-06 11:31:55 +00:00
Dylan K. Taylor
8e984a1bc3 RuntimeBlockMapping: use new data, item frames & doors fixed
floor & ceiling item frames not supported though
2019-12-06 11:31:18 +00:00
Dylan K. Taylor
4d13c48e5c UPnP: COM constructor never returns false anymore 2019-12-05 16:07:06 +00:00
Dylan K. Taylor
e3cffca34b StartGamePacket: fixed possible type violation on decoding block table 2019-12-05 11:05:34 +00:00
Dylan K. Taylor
d20d9fb689 Merge branch 'stable' into drew-1.13 2019-12-05 10:59:53 +00:00
Dylan K. Taylor
7b75b6928d AvailableCommandsPacket: fixed foreach docs
these probably aren't necessary at all to be honest.
2019-12-04 10:15:50 +00:00
Dylan K. Taylor
740f0a2314 crafting now works on 1.13, but it's not good 2019-12-02 21:50:52 +00:00
Dylan K. Taylor
7fdfe947b0 inventory: fix some transactions being rejected for no good reason
since 1.13, transactions such as interacting with creative inventory cause a spoof windowID 124 slot 50 action to appear which changes air -> air. This currently gets rejected because only cursor is mapped to ID 124, and it only has a single slot.

It is not clear what the purpose of 124:50 is, but this fix filters out any actions which do not change anything, since they won't affect transaction balance anyway.
2019-12-02 21:41:08 +00:00
Dylan K. Taylor
b7c4379700 StartGamePacket: fixed asymmetry in block table handling 2019-12-02 19:35:55 +00:00
Dylan K. Taylor
20b7418916 PlayerAuthInputPacket: added encode & decode, and some aux classes 2019-12-02 15:14:59 +00:00
Dylan K. Taylor
85521f5e7a EducationSettingsPacket: added encode & decode 2019-12-02 13:57:19 +00:00
Dylan K. Taylor
f37ea6a203 AvailableCommandsPacket: fix nonsensical placement of HARDCODED_ENUMS 2019-12-02 12:57:05 +00:00
Dylan K. Taylor
abf8081ebc RuntimeBlockMapping: add a type check for decoded NBT root type
this is kinda redundant since this function can blow up in so many other ways anyway, but it makes PHPStan happy, so it'll do.
2019-12-02 08:21:42 +00:00
Dylan K. Taylor
8594cb3e74 AvailableCommandsPacket: fixed doc comment for putEnumConstraint() 2019-12-02 08:17:00 +00:00
Stephen
e37c8e3a5d Merge branch 'drew-1.13' of https://github.com/dktapps/PocketMine-MP into dktapps-drew-1.13 2019-12-01 22:02:40 -05:00
Stephen
e38c0c0fe1 Merge remote-tracking branch 'upstream/stable' into stable 2019-12-01 21:55:50 -05:00
Dylan K. Taylor
92e1811b06 DataPacket: fixed bad null assignment to buffer in clean()
this is never expected to be null, so implicitly relies on PHP magic behaviour to convert it to string when appended.
2019-12-01 20:36:56 +00: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
Dylan K. Taylor
d8188b807a CraftingDataPacket: read & write potion recipes 2019-11-30 21:18:54 +00:00
Dylan K. Taylor
8e68655fc7 Merge branch 'stable' into drew-1.13 2019-11-30 21:15:50 +00:00
Dylan K. Taylor
6d109bfc6f CraftingDataPacket: fixed not retaining cleanRecipes during decode 2019-11-30 21:15:37 +00:00
Dylan K. Taylor
b7a5a53c9d MoveActorDeltaPacket: flags is now a short 2019-11-30 12:56:16 +00:00
Dylan K. Taylor
76bd0f452c AvailableCommandsPacket: add special handling for enums which aren't referenced by any command directly
the CommandName enum is a magic enum used by the  argtype.

TODO: It's possible that not sending the CommandName enum might be causing client sided crashes. Investigate.
2019-11-30 12:41:44 +00:00
Dylan K. Taylor
363556e9b6 AvailableCommandsPacket: encode & decode for enum value constraints
This is a peculiarly overengineered system that is used for restricting access to enum members under certain conditions, e.g. to disallow changing specific gamerules in survival.
2019-11-30 12:31:31 +00:00
Dylan K. Taylor
6f08853b29 Merge branch 'stable' into drew-1.13 2019-11-30 12:04:46 +00:00
Dylan K. Taylor
42d8357821 AvailableCommandsPacket: fixed missing decoded overloads with 0 arguments
these should be listed even if they have 0 arguments
2019-11-30 11:58:29 +00:00
Stephen
5d17405b92 Better checks on resource patch 2019-11-28 19:48:34 -05:00