Dylan K. Taylor
889cd5e206
PlayerNetworkSessionAdapter: clean up leftovers from multi quote support for json decode
2020-02-05 20:45:13 +00:00
Dylan K. Taylor
fa82cb26d8
added native types to closures (phpstan-strict-rules)
2020-02-05 16:35:10 +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
99038c752c
Avoid usage of for-loop vars outside of for-loop context
...
these problems were reported by PHPStan strict rules. They aren't actually bugs, but they could become bugs in the future.
2020-02-05 13:16:09 +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
259f0425a9
ClientboundMapItemDataPacket: replace assoc array with MapDecoration class
...
I thought I'd done this already, but it appears not.
2020-01-30 20:05:18 +00:00
Dylan K. Taylor
640df1003c
add some Generator generics for PHPStan
2020-01-29 16:38:50 +00:00
Dylan K. Taylor
8184a6b114
SkinImage: enforce that height/width must be positive
2020-01-22 14:58:36 +00:00
Dylan K. Taylor
b8d44ff162
SkinImage: fix formatting error
2020-01-22 14:58: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
bff5bf25ae
LegacySkinAdapter: make resource patch validity check more robust
2020-01-22 14:36:40 +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
fffeeddca6
DataPacket: add magic method return types to keep phpstan happy
...
this really shouldn't be necessary, but it is what it is.
2020-01-19 17:14:34 +00:00
Dylan K. Taylor
b42966f61b
network: explicitly specify @return void
2020-01-18 19:35:01 +00:00
Dylan K. Taylor
ca86ec2ec2
Network: added missing return type information for getUpload() and getDownload()
2020-01-18 19:33:27 +00:00
Dylan K. Taylor
ab57914322
CraftingDataPacket: added native return typehints to private methods
2020-01-18 17:45:15 +00:00
Dylan K. Taylor
f6d96c5827
DataPacket: clean() returns $this, not void
2020-01-14 17:30:48 +00:00
Dylan K. Taylor
b1458db47b
Revert "CraftingDataPacket: fixed trying to return void result of parent function"
...
This reverts commit e12ecaf62960dfc71871520e52787589447346ee.
2020-01-14 17:16:17 +00:00
Dylan K. Taylor
2d2c9379cd
DataPacket: apply @return void annotations to make phpstan happy
...
this eliminates 250+ errors on level 6.
2020-01-14 15:39:07 +00:00
Dylan K. Taylor
3400771770
DataPacket: add missing return type info for pid()
2020-01-14 15:38:24 +00:00
Dylan K. Taylor
e12ecaf629
CraftingDataPacket: fixed trying to return void result of parent function
2020-01-14 15:37:06 +00:00
Dylan K. Taylor
818d0e19ab
RCONInstance: remove always-false branch (readPacket() never returns null)
2020-01-11 21:54:03 +00:00
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