14585 Commits

Author SHA1 Message Date
Dylan K. Taylor
15fca84f3b
remove some PHPStan error patterns 2021-11-04 19:22:49 +00:00
Dylan K. Taylor
c60144210f
Regenerate PHPStan bugs baseline 2021-11-04 19:18:29 +00:00
Dylan K. Taylor
8ac999cbd4
Use object models for crashdump generation 2021-11-04 16:55:04 +00:00
Dylan K. Taylor
4f8501ff34
Added a tool to visualise behaviour of ChunkSelector
I actually intended to write a tool for debugging generation, but it turns out this, as an intermediary step, is also useful and a whole bunch of fun to play with.
2021-11-04 14:14:55 +00:00
Dylan K. Taylor
2405e45b35
Player: mark as not using item when held item slot is changed
closes #4538
2021-11-03 21:26:20 +00:00
Dylan K. Taylor
e0b07ff308
Human: do not add more XP if totalXp limit was already reached
this matches the vanilla behaviour. For some reason it doesn't consider levels (so you can have a level higher or lower than this without actually having that amount of XP), but this matches Java behaviour as of 1.10.

fixes #4543
2021-11-03 20:45:55 +00:00
Dylan K. Taylor
729f831b8f
PHPStan 1.0.2 2021-11-03 20:26:32 +00:00
Dylan K. Taylor
0356716e8e
PopulationTask: do not expose internal fields as public
this code dates back to pthreads v2, when visibility on Threaded object fields meant different things (wtf, krakjoe??)
2021-11-03 15:23:43 +00:00
Dylan K. Taylor
5c81b04813
PopulationTask: use typed properties 2021-11-03 15:22:49 +00:00
Dylan K. Taylor
1ebb206762
World: fixed yet another edge case in drainPopulationRequestQueue() leading to assertion failure
really had to go fucking nuclear on it :(
2021-11-03 14:58:58 +00:00
dependabot[bot]
29e2d92098
Bump phpstan/phpstan from 1.0.0 to 1.0.1 (#4541)
Bumps [phpstan/phpstan](https://github.com/phpstan/phpstan) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/phpstan/phpstan/releases)
- [Commits](https://github.com/phpstan/phpstan/compare/1.0.0...1.0.1)

---
updated-dependencies:
- dependency-name: phpstan/phpstan
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-11-03 11:27:42 +00:00
Dylan K. Taylor
ef82a2cd79
Fixed PlayerEmoteEvent::setEmoteId() being useless 2021-11-02 23:10:26 +00:00
Dylan K. Taylor
87031627bf
Do not call PlayerEmoteEvent if rate limit was reached 2021-11-02 23:09:43 +00:00
Hashim
f066199971
Implement emote support (#4523) 2021-11-02 23:04:55 +00:00
Dylan K. Taylor
a0e9eec652
4.0.0-BETA11 is next 2021-11-02 19:18:20 +00:00
Dylan K. Taylor
fa6a432d58
Release 4.0.0-BETA10 4.0.0-BETA10 2021-11-02 19:18:19 +00:00
Dylan K. Taylor
102277c636
draft-release: fixed BedrockData JSON minification 2021-11-02 19:16:36 +00:00
Dylan K. Taylor
f50f26d52e
4.0.0-BETA10 is next 2021-11-02 19:14:15 +00:00
Dylan K. Taylor
4ca7c29cde
Release 4.0.0-BETA9 4.0.0-BETA9 2021-11-02 19:14:12 +00:00
Dylan K. Taylor
9f64bc8180
Merge branch 'stable' 2021-11-02 17:30:36 +00:00
Dylan K. Taylor
f75a05d7fa
3.25.3 is next 2021-11-02 17:21:49 +00:00
Dylan K. Taylor
3dae873731
Release 3.25.2 3.25.2 2021-11-02 17:21:44 +00:00
Dylan K. Taylor
aa0dc60c32
Merge branch 'master' of github.com:pmmp/PocketMine-MP 2021-11-02 17:10:19 +00:00
Dylan K. Taylor
d184838ba0
Move Promise classes to their own namespace 2021-11-02 17:10:07 +00:00
Colin
ead8ccf08d
CocoaBlock: call BlockGrowEvent when growing for any reason (#4536) 2021-11-02 17:05:07 +00:00
Dylan K. Taylor
38f97bed52
World: fixed PopulationTask failed assumption that generator is always registered
if the worker selected previously had a generator registered, but has since been shutdown, the workerStartHook that cleans up generatorRegisteredWorkers won't yet have been called.
This results in the worker being started by the submission of PopulationTask, and the generator doesn't get preemptively registered.
2021-11-02 16:58:14 +00:00
Dylan K. Taylor
275f145418
BedrockData is now a Composer dependency
this should put a stop to people nagging me about incorrect blocks (we have a check to make sure composer dependencies are up to date).
2021-11-02 16:45:45 +00:00
Dylan K. Taylor
6b07f7a5ec
pmmp/BedrockProtocol@5.0.0+bedrock-1.17.40 2021-11-02 16:22:56 +00:00
Dylan K. Taylor
e131c2cefa
Drop pocketmine/spl 2021-11-02 16:08:29 +00:00
Dylan K. Taylor
e34364412b
Replace InvalidStateException usages with InvalidArgument or LogicException 2021-11-02 16:05:54 +00:00
Dylan K. Taylor
4eef458d29
Config: throw AssumptionFailedError if config type is invalid or DETECT during save()
this should never happen ... it was already checked in load()
2021-11-02 16:03:43 +00:00
Dylan K. Taylor
8b3565b75d
PopulationTask no longer depends on a World object
this means it's now possible to test generation offline without too much hassle.
World::generateChunkCallback() has been removed from public API.
2021-11-02 15:40:51 +00:00
Dylan K. Taylor
facfd7c04a
sanity check 2021-11-02 15:26:54 +00:00
Dylan K. Taylor
65ef9f786a
Use standard chunkHash() to index population chunks 2021-11-02 15:25:03 +00:00
Dylan K. Taylor
4dc13ab3da
ConsoleReaderThread: strip control characters
this fixes a bug I encountered when accidentally pressing ctrl+a+d (which inserts a chr(1) character), because it made the server unable to find the command - but still reported an error containing what looked like a valid command (character isn't printable).
2021-11-02 15:11:23 +00:00
Rush2929
ede4157814
Check to see if the player can start using the Releasable item. (#4532) 2021-11-02 14:36:16 +00:00
Dylan K. Taylor
34ea199fb0
World: fixed additional edge case - population promise rejected before task completion
if this happened, the index would stay set in activeChunkPopulationTasks, eventually causing the generation queue to jam up completely and non-forced generation to come to a standstill.
2021-11-02 14:30:23 +00:00
Dylan K. Taylor
1775699f05
World: make sure that chunks locked by PopulationTask always get unlocked, no matter what
fixes #4527
2021-11-02 14:20:42 +00:00
Dylan K. Taylor
32a857b8b4
fix CS 2021-11-02 14:09:16 +00:00
Dylan K. Taylor
7e4be29fc4
Gracefully force-shutdown on failure to start RakLib
this now won't generate a crashdump.
2021-11-02 13:51:01 +00:00
Dylan K. Taylor
c17587d436
World: use new Vector3() instead of Block->getPosition()
When profiling this, I noticed that we spend a stupidly large amount of time creating useless Position objects in the case of update=true, because Vector3->sides() calls Position->getSide(), which calls Position::fromObject(parent::getSide()). This is stupid because the update logic doesn't require Positions anywhere (as evidenced by this change needing no other alterations.

A rough profile shows that this improves setBlock() performance by about 25% in the update=true case, which is a pretty big margin.
As an added bonus, it gets rid of some unrealized cyclic dependencies in World->changedBlocks.
2021-11-02 03:00:00 +00:00
Dylan K. Taylor
0f6b7e48cb
Updated BedrockProtocol:
it's weirdly satisfying that LevelChunkPacket::create() with the extra parameter turns out to be exactly the same length as the old way.
2021-11-02 01:37:56 +00:00
Dylan K. Taylor
f2912fcdd8
Updated pocketmine/log and pocketmine/log-pthreads (BC breaks included)
AttachableLogger deals with Closures now instead of LoggerAttachment objects
ThreadedLoggerAttachment no longer implements LoggerAttachment
2021-11-01 22:22:22 +00:00
Dylan K. Taylor
f6cb4f9597
Updated BedrockProtocol 2021-11-01 21:32:02 +00:00
Dylan K. Taylor
54442f7e4b
Merge branch 'stable' 2021-11-01 21:18:35 +00:00
Dylan K. Taylor
5257755dc5
shut 2021-11-01 21:15:58 +00:00
Dylan K. Taylor
8c16ecaa5b
Merge branch 'stable' 2021-11-01 21:08:32 +00:00
Dylan K. Taylor
3214da8642
pthreads 4.0.0 2021-11-01 21:01:59 +00:00
Dylan K. Taylor
f827a555d5
Merge branch 'stable' 2021-11-01 18:13:24 +00:00
Dylan K. Taylor
61145baded
Merge commit 27ae959e8 2021-11-01 17:42:31 +00:00