9895 Commits

Author SHA1 Message Date
dependabot-preview[bot]
8ac32824a2
Bump phpunit/phpunit from 9.3.9 to 9.3.10 (#3828) 2020-09-15 17:01:03 +00:00
dependabot-preview[bot]
1322defead
Bump phpunit/phpunit from 9.3.8 to 9.3.9 (#3825) 2020-09-12 12:32:33 +00:00
Dylan K. Taylor
d084b7a34b RegionGarbageMap: add an extra overlap check
this shouldn't ever be triggered, but we want to know if it does.
2020-09-12 01:38:13 +01:00
Dylan K. Taylor
c2d0605b1e Entity: avoid implicit float truncation in getDirection()
this didn't cause any bugs because of the way the function is written, but it might have in other circumstances.
2020-09-11 21:01:22 +01:00
Dylan K. Taylor
0ff0b33047 StatusCommand: avoid modulo operator on float
this was detected by a custom PHPStan extension.
2020-09-11 20:56:18 +01:00
Dylan K. Taylor
114df07622 RegionLoader: specify type of unpack() return
PHPStan has no idea what is going on in this code because unpack() returns mixed[].
Possibly it might be a good idea to implement a dynamic return type extension for this.
2020-09-11 20:48:37 +01:00
Dylan K. Taylor
4a88db7f43 travis: update pthreads to pmmp/pthreads@b81ab29df5 2020-09-11 14:30:22 +01:00
Dylan K. Taylor
d3ea29d527 Release memory to OS on garbage collection
ZMM often holds onto big chunks of memory after they aren't used anymore, which is fine in a webserver, but it's not OK for PM.
2020-09-09 01:40:18 +01:00
Dylan K. Taylor
d2f1a3cf5b SubChunk: workaround opcache preloading constant issue
non-class constants aren't stored during preloading phase and for some reason they aren't pre-resolved in opcode arrays. However, they are resolved by value when referenced by class constants, and class constants stick, so we can use those instead.
2020-09-04 17:53:22 +01:00
Dylan K. Taylor
f9c2ed6200 composer: do not install packages with min version higher than 7.3.0
running composer update on 7.4 will generate a lock file using the newest dependencies which work for the current PHP version, which usually isn't desirable for a project like this where developers might be using newer PHP versions than users.
2020-09-04 01:00:26 +01:00
dependabot-preview[bot]
e47a711494
Bump phpstan/phpstan from 0.12.40 to 0.12.42 (#3812) 2020-09-03 14:13:14 +00:00
Dylan K. Taylor
2ea7a9e216 3.15.2 is next 2020-09-03 15:09:52 +01:00
Dylan K. Taylor
9f60484212 Release 3.15.1 3.15.1 2020-09-03 15:09:52 +01:00
Dylan K. Taylor
3031d89ec5 Potato: drop 1-5 potatoes per harvest, not 1-4 2020-09-03 14:54:58 +01:00
Dylan K. Taylor
883e135bc0 Potato: drop poisonous potatoes when harvested, fixes #2830 2020-09-03 14:54:04 +01:00
Dylan K. Taylor
4448f603a6 Updated build/php submodule to pmmp/php-build-scripts@3a3e3495c3 2020-09-03 14:53:23 +01:00
Dylan K. Taylor
9365525efa ANTI CHEAT DOESN'T TRIP ON STAIRS ANYMORE 🎉
This commit fixes the 5+ years-old bug with the movement anti-cheat that everyone has complained about: sprinting on stairs causes rubberbanding.
This commit addresses this problem at long last, along with a handful of precursor commits that were necessary to fix this problem:
- dac76f0e0f14d9beae3e55491ab9f61353db1b68
- 89fe8f7f10716fed6193646984a7e2d28f6f6ce5
- 2d77b1e3649d11a6072fbd1dbf88574b6ebf1af3

Additionally, these changes now allow the anti-cheat to be accurate to at least 0.001 of a block, perhaps even better. I didn't commit a change to the threshold here, but it was instrumental to pinning down the exact nature of these bugs.

This closes #1475, at long last.
2020-09-03 14:27:11 +01:00
Dylan K. Taylor
17bee5e349 Fixed crash when using strings for flatworld layers
I don't know why this didn't show up sooner.
2020-09-03 14:15:37 +01:00
Dylan K. Taylor
c6e0753c3e clean up phpstan baselines 2020-09-02 15:04:37 +01:00
Dylan K. Taylor
2ae7ba275b Updated Composer dependencies 2020-09-02 12:15:29 +01:00
dependabot-preview[bot]
6aa0a82341
Bump phpstan/phpstan-strict-rules from 0.12.4 to 0.12.5 (#3807) 2020-09-01 10:00:39 +00:00
KingOfTurkey38
0af08a7375
Call BlockGrowEvent when sugarcane grows (#3780) 2020-08-31 16:03:38 +01:00
Dylan K. Taylor
81c1613e5d StupidJsonDecodeTest: added a callable prototype
for some reason this causes a new error to be reported which previously didn't show. I have no idea why.
2020-08-31 13:45:46 +01:00
Stephen B
9cf8f608d8
Provide a default for health (#3806) 2020-08-30 21:50:11 +01:00
SOFe
dd4f26a9cf
Switch "Auto: Spam" trap to direct links (#3550) 2020-08-30 18:03:38 +01:00
Dylan T
f976545f56
Delete security-dos-vulnerability.md 2020-08-29 23:41:37 +01:00
Dylan T
9929fb0abd
Create SECURITY.md 2020-08-29 23:40:47 +01:00
Dylan K. Taylor
37e453b875 Updated composer dependencies 2020-08-28 23:34:32 +01:00
Dylan K. Taylor
b7578fef9c Fixup TesterPlugin to PHPStan standards 2020-08-28 21:17:21 +01:00
Dylan K. Taylor
09eb904f6b fixed explicit-mixed errors exposed by upgrading pocketmine/nbt 2020-08-28 15:47:41 +01:00
dependabot-preview[bot]
b47d6bbc22
Bump phpstan/phpstan from 0.12.39 to 0.12.40 (#3800) 2020-08-27 11:45:20 +00:00
dependabot-preview[bot]
aa26ddf8b1
Bump phpunit/phpunit from 9.3.7 to 9.3.8 (#3799) 2020-08-27 11:44:54 +00:00
dependabot-preview[bot]
119c72980f
Bump phpstan/phpstan from 0.12.37 to 0.12.39 (#3794) 2020-08-25 20:38:22 +00:00
Dylan K. Taylor
eba888449d ExperienceUtils: handle an unhandled error condition explicitly
this would previously throw a TypeError on some negative numbers and crash. This should still crash, but this makes it explicit.
2020-08-25 21:28:29 +01:00
Dylan K. Taylor
dac76f0e0f Player: reset ySize when syncing movement 2020-08-23 18:31:25 +01:00
Dylan K. Taylor
89fe8f7f10 Entity: shift BB back down after trying to auto-step
this fixes bugs where the entity would jump in the air when walking on blocks like carpet. It also fixes a lot of the issues with stepping in the anti-cheat, allowing to reduce the error tolerance on movement processing.
2020-08-23 17:54:48 +01:00
Dylan K. Taylor
2d77b1e364 Entity: fixed recalculateCollisionBox not taking ySize into account
this was causing the movement anti-cheat to shit itself after the first movement because it used setPosition() on the player if the position wasn't exactly perfect (which obviously it never is perfect, because of fp rounding errors).
2020-08-23 17:51:36 +01:00
Dylan K. Taylor
e59a4296f8 LevelDB: fixed crash on corrupted level.dat 2020-08-22 19:36:22 +01:00
Dylan K. Taylor
6856761946 Updated composer dependencies to fix some 7.4 issues 2020-08-21 22:09:26 +01:00
Dylan K. Taylor
4fe3401182 travis: moved PHP-specific configuration to its own YAML file
this allows it to be imported by other repos using the same config (for example plugins needing PHPStan analysis) without them needing to copy paste big blocks of shit every time something little changes.
2020-08-21 17:42:47 +01:00
Dylan K. Taylor
e80ad22702 Updated build/php submodule 2020-08-21 00:34:10 +01:00
Dylan K. Taylor
c22ab37372 Player: pre-cancel PlayerInteractEvent when left-clicking a block in spectator mode
fixes #3778
2020-08-20 23:43:52 +01:00
Dylan K. Taylor
1f9d672cfc Updated DevTools submodule to release 1.14.1 2020-08-20 16:49:49 +01:00
Dylan K. Taylor
974cbae725 travis: added PHP 7.4 2020-08-20 16:21:58 +01:00
Dylan K. Taylor
b53f88027e Explosion: fixed blocks getting updated too early
this bug became painfully obvious when testing bamboo. Detonating TNT near tall bamboo canes would result in bamboo canes not deleting themselves in some circumstances, because the non-destroyed parts of the cane would be updated before their supporting block was deleted, and subsequently would not be re-updated afterwards.
I think this bug should also reproduce with cacti, but I have not tested.
2020-08-16 00:09:17 +01:00
Dylan K. Taylor
9a0f723dff Updated composer dependencies 2020-08-15 20:19:37 +01:00
Dylan K. Taylor
ab2003a85d Merge branch 'stable' of https://github.com/pmmp/pocketmine-mp into stable 2020-08-15 20:17:04 +01:00
Dylan K. Taylor
4befd9095a Updated build/php submodule to pmmp/php-build-scripts@f93a6f0e31 2020-08-15 20:16:29 +01:00
dependabot-preview[bot]
06623d788a
Bump phpunit/phpunit from 9.3.5 to 9.3.7 (#3771) 2020-08-15 17:46:26 +00:00
Dylan T
730ee74a65
Use objects for internal structures created in TextFormat::toJSON() (#3747) 2020-08-15 18:30:26 +01:00