13252 Commits

Author SHA1 Message Date
Dylan K. Taylor
0e396dc47d
actions: update PHP extension versions 2021-02-11 16:24:09 +00:00
Dylan K. Taylor
d2204da1d5
[ci skip] center the build badges 2021-02-11 16:05:55 +00:00
Dylan K. Taylor
2a51269305
Merge branch 'stable' of https://github.com/pmmp/pocketmine-mp into stable 2021-02-11 16:05:24 +00:00
Dylan K. Taylor
298034549e
actions: drop ext-ds from PHP build 2021-02-11 15:56:19 +00:00
Dylan K. Taylor
672622950f
ObjectSet: make add() and remove() variadic to match ds
there are still some variadic usages in the code, which, infuriatingly, phpstan does not detect (phpstan/phpstan#4528).
2021-02-11 15:54:05 +00:00
Dylan K. Taylor
c61f66d973
Removed ext-ds dependency 2021-02-11 15:40:37 +00:00
Dylan K. Taylor
b03ca1953a
Remove usage of Ds\Deque from WritableBookBase
ext-ds is not well maintained, and also not very well written. I'm planning to drop this extension for stability's sake.
2021-02-11 14:07:49 +00:00
Govdim
e061028b69
Added Hopper::setFacing() and Hopper::getFacing() (#4030) 2021-02-09 16:04:05 +00:00
dependabot-preview[bot]
928041ddf1
Bump phpstan/phpstan from 0.12.71 to 0.12.74 (#4028)
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 0.12.71 to 0.12.74.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Commits](https://github.com/phpstan/phpstan/compare/0.12.71...0.12.74)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2021-02-08 21:42:08 +00:00
Dylan T
007f4f9350
CraftingDataPacket: Remove useless @var comment 2021-02-08 11:53:50 +00:00
Dylan K. Taylor
e80c1a0ce9
Split Mushroom Stem away from other mushroom variants
mushroom stem (and all-sided stem) are unique blocks, which don't drop anything and which don't stack with other shroom variants when block-picked.
They also get mapped to the same block when placed, and there's no distinction between red mushroom stem and brown mushroom stem.
2021-02-07 22:02:50 +00:00
Dylan K. Taylor
edfe9ae745
Merge branch 'stable' 2021-02-07 21:11:24 +00:00
Dylan K. Taylor
46e9f0cec6
Player: fixed verify-xuid not kicking in by default on old configs 2021-02-07 21:10:23 +00:00
Dylan K. Taylor
8d5cc9adc3
Merge branch 'stable' 2021-02-07 20:57:19 +00:00
Dylan K. Taylor
c05779314d
Allow offline player data to be provided from a custom source 2021-02-07 20:29:37 +00:00
Dylan K. Taylor
7745310870
Use native property types for login JSON models
this significantly reduces the amount of PHPDoc boilerplate, because the remaining doc comments can mostly be reduced to 1 line.
2021-02-07 17:54:38 +00:00
Dylan K. Taylor
c456f21df8
one more 2021-02-07 17:36:49 +00:00
Dylan K. Taylor
f952a6643c
Accept PHP 8.0 compatible dependency versions in composer.json
composer decided that this was a good time to reorganize composer.json for me, and... well, fuck it.
2021-02-07 17:33:33 +00:00
Dylan K. Taylor
606d56b55d
Composer: lock in PHP at ^7.3 || ^8.0, don't leave it unbounded 2021-02-07 17:31:32 +00:00
Dylan K. Taylor
da7c97f885
Updated composer dependencies 2021-02-07 17:27:01 +00:00
Dylan K. Taylor
bd4ce8d941
TNT: expose unstable flag 2021-02-06 23:46:51 +00:00
Dylan K. Taylor
fd2ebd84b4
Recognize underwater TNT 2021-02-06 23:37:05 +00:00
Dylan K. Taylor
609b21679f
Added Torch::setFacing() and Torch::getFacing()
these are not implemented with AnyFacingTrait because it would break LSP to have a setFacing that doesn't accept DOWN.
2021-02-06 22:31:36 +00:00
Dylan K. Taylor
ce855f2133
Added isPressed() and setPressed() to PressurePlate 2021-02-06 21:20:38 +00:00
Dylan K. Taylor
7c1f0ecb8b
Fixed getAxis()/setAxis() not being seen by static analysers for some blocks
when using VanillaBlocks::CHISELED_QUARTZ(), VanillaBlocks::PURPUR_PILLAR() or VanillaBlocks::QUARTZ_PILLAR(), static analysis was unable to detect getAxis() and setAxis(), because these blocks were implemented using anonymous classes.
2021-02-06 20:39:23 +00:00
Dylan K. Taylor
9887138ac1
Get rid of anonymous classes for infested stone 2021-02-06 20:30:25 +00:00
Dylan K. Taylor
21bafd9f07
PluginBase: add void return typehints to onLoad(), onEnable() and onDisable() 2021-02-06 20:20:36 +00:00
Dylan K. Taylor
82bb83211f
CocoaBlock: deduplicate attachment condition checking 2021-02-06 19:34:52 +00:00
Dylan K. Taylor
9ab3c57789
RedstoneRepeater: added getDelay() and setDelay() 2021-02-06 19:03:33 +00:00
Dylan K. Taylor
233616aa6a
RedstoneLamp now uses PoweredByRedstoneTrait 2021-02-06 19:02:13 +00:00
Dylan K. Taylor
5be03c3196
Make more use of PoweredByRedstoneTrait 2021-02-06 18:43:33 +00:00
Dylan K. Taylor
48ef8771cd
Added AnalogRedstoneSignalEmitterTrait 2021-02-06 18:33:14 +00:00
Dylan K. Taylor
02b0036cbe
DaylightSensor: refactor power -> signalStrength 2021-02-06 17:47:29 +00:00
Dylan K. Taylor
4fc3bc53f7
Clean up hierarchy of rails
detector rail has fundamentally different functionality than activator and powered rails, so it's misleading to present the same APIs for both.
detector rail's 'powered' state is better referred to as 'activated', since it means the detector rail is actually _producing_ power, and not _receiving_ power.
2021-02-05 22:00:17 +00:00
Dylan K. Taylor
78a62a8b27
Remember and verify player XUIDs (controlled by player.verify-xuid in pocketmine.yml) 2021-02-05 14:42:57 +00:00
Dylan K. Taylor
6ccfe21d57
Block: improved accuracy of isFullCube() 2021-02-04 23:10:13 +00:00
Dylan K. Taylor
c5bdd7dd64
Added a unit test to ensure valid format of MINECRAFT_VERSION_NETWORK 2021-02-04 22:36:40 +00:00
Dylan K. Taylor
169650dc5b
MainLogger: accept timezone as a constructor parameter
this makes it easier to unit-test, as well as making it independent of Timezone.
2021-02-04 21:50:06 +00:00
Dylan K. Taylor
54d9342ed9
AsyncPool: Always collect workers, even if the task queue is empty
because of the way async tasks are processed, we might collect results from a task before it's able to be collected by collect(). Therefore, the queue might be empty, even though there are still tasks to be collected.
2021-02-04 21:43:53 +00:00
Dylan K. Taylor
27b1951df7
MainLogger: accept main thread name as a constructor parameter 2021-02-04 20:55:50 +00:00
Dylan K. Taylor
709b4154d7
MainLogger: Require useFormattingCodes as a constructor parameter
this avoids needing to call Terminal::init() before starting a MainLogger. Since it inits the formatting codes anyway when log messages are first recorded, it shouldn't be necessary to pre-initialize it.
2021-02-04 19:16:22 +00:00
Dylan K. Taylor
6d64fb9af8
MainLogger: remove obsolete logFile field 2021-02-04 16:51:02 +00:00
dependabot-preview[bot]
8ee37a3033
Bump phpunit/phpunit from 9.5.1 to 9.5.2 (#4023) 2021-02-04 16:46:22 +00:00
Dylan K. Taylor
7684dc03fa
Merge remote-tracking branch 'origin/stable' 2021-02-04 16:45:34 +00:00
Dylan K. Taylor
7e3e63f342
Fixed race condition in MainLogger shutdown
this resulted in a deadlock in https://github.com/pmmp/PocketMine-MP/runs/1831812620?check_suite_focus=true because the notify() arrived while writeLogStream() was executing.
This ensures that either:
- the notification will occur before the sleep, and therefore no sleeping will occur (this->shutdown = true before the wait)
- the notification will arrive during the sleep.
2021-02-04 16:40:10 +00:00
Dylan K. Taylor
ae75d73f48
Extract MainLoggerThread unit from MainLogger
MainLogger is no longer a Thread, as per the recent changes to pocketmine/log-pthreads.
2021-02-04 16:28:49 +00:00
Dylan K. Taylor
4b9639f6c9
Merge branch 'stable' 2021-02-04 15:55:39 +00:00
Dylan K. Taylor
8ef1e54e20
MainLogger: fixing CPU waste on logger thread
this doesn't need to keep spinning every 25ms; it can just wake up when there's actually log messages to write into the buffer.
2021-02-04 15:07:40 +00:00
Dylan K. Taylor
eaf3a86981
MainLogger: fixed UB in writeLogStream()
notify() has to be used inside a synchronized block.
2021-02-04 15:03:14 +00:00
Dylan K. Taylor
317a48d9b0
ItemStackRequest: expose filterStrings 2021-02-03 23:40:34 +00:00