18072 Commits

Author SHA1 Message Date
Dylan K. Taylor
9946ea9e8a
get rid of the old hack 2025-05-28 23:07:02 +01:00
Dylan K. Taylor
14b70c04ad
NetworkSession: add support for discarding repeated packets before they're decoded
this dramatically reduces the server workload dealing with spammy packets like right-click interactions trigger.
It also solves the problem of players getting kicked for right-clicking for too long.
2025-05-28 23:00:46 +01:00
Dylan K. Taylor
56da492e48
World: make less noise about deleted tile entities
no need to repeat the same message 100 times
2025-05-28 22:10:20 +01:00
Dylan K. Taylor
035d2dec23
LevelDB: make unknown block errors way less annoying
these would previously generate a new line for every error.
since errors are often repeated for different offsets (e.g. different states of the same block),
we can save a lot of spam by deduplicating them and telling which offsets the errors occurred in.
2025-05-28 22:03:29 +01:00
Dylan K. Taylor
baafaed362
Stem drops seeds according to binomial distribution
fixes #6709

we really need a better way to reverse-engineer the chance parameter for these
as the wiki just gives a probability table, which is quite tiresome to extract
patterns from.
2025-05-28 21:00:40 +01:00
Adam
bf33a625c9
Implemented Respawn Anchor (#6646)
PlayerRespawnAnchorUseEvent is also added with options SET_SPAWN and EXPLODE, which allows plugins to customise the outcome of using the anchor in PM, which currently doesn't support dimensions. The event is also cancellable.
2025-05-27 21:57:28 +01:00
Dylan T.
059f4ee7bf
Extract GeneratorExecutor system from World, v2 (#6682)
- `AsyncGeneratorExecutor` class added that encapsulates the logic of generating chunks using async tasks as previously
- `GeneratorExecutor` interface added that can be implemented to provide chunks in other ways
- `SyncGeneratorExecutor` which invokes the generator directly on the main thread, useful for simple generators like `Flat` where async tasks are not needed
- Some redundant APIs were removed from `World` (these will probably come back as deprecated stubs for the remainder of 5.x, but I was having too much fun deleting code)
- Removed internal `World->registerGeneratorToWorker()` (no longer useful)
- `World` now invokes generator executor instead of posting AsyncTasks directly
- Some internal classes moved to `pocketmine\world\generator\executor` (PopulationTask excluded because plugins use it in lieu of being able to regenerate chunks
- Generators can opt into main-thread execution by setting the `$fast` parameter to `true` in `GeneratorManager::register()`
2025-05-27 21:51:10 +01:00
Dylan K. Taylor
dd17adeaaf
Reintroduce step height additions for minor-next
Revert "Revert change that can't go on stable"

This reverts commit a554d2acf5db00f577493517e36bb3ad07a6bdd0.
2025-05-25 11:33:47 +01:00
Dylan K. Taylor
98f28f8b6d
Merge branch 'stable' into minor-next 2025-05-25 11:33:32 +01:00
Dylan K. Taylor
a554d2acf5
Revert change that can't go on stable
API additions need to wait for the next minor release

Revert "Entity: make stepHeight accessable (#6702)"

This reverts commit 5527a0c6bf4343b39cd6ed4526f75539ac6ddf19.
2025-05-25 11:32:40 +01:00
ItzxDwi
5527a0c6bf
Entity: make stepHeight accessable (#6702) 2025-05-25 10:07:41 +02:00
zSALLAZAR
eee2e62d81
Add EntityFrostWalkerEvent (#6673) 2025-05-25 10:01:46 +02:00
ipad54
4d5c27a734
Unit test block hardness & blast resistance values (#6629) 2025-05-24 21:01:36 +01:00
Dylan K. Taylor
e1af2a4af1
Update language dependency 2025-05-24 16:19:48 +01:00
pmmp-admin-bot[bot]
f656d7d3d7 Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/15221216334
2025-05-24 00:02:49 +00:00
Dylan T.
3636173d75
... 2025-05-23 23:28:15 +01:00
Dylan T.
9606c0e0bb
Remove stale labels as well as Waiting on Author labels
actions/stale is far too slow to do this itself since it processes lots of irrelevant crap on every run
2025-05-23 22:16:57 +01:00
pmmp-admin-bot[bot]
55123b36e1 Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/15090310700
2025-05-18 00:03:33 +00:00
Dylan K. Taylor
94fb5d95b9
CommonThreadPartsTrait: fixed thread crashes sometimes missing cause info
closes #6669

this happens because isTerminated returns true before the thread's shutdown handler runs,
so we join with the thread to make sure that shutdown handlers are done before returning.

... hopefully we don't get servers randomly deadlocking in shutdown handlers ???
2025-05-17 19:09:54 +01:00
Dylan K. Taylor
b5f236c019
Apparently we're supposed to use replace for this, not provide 2025-05-17 18:09:14 +01:00
pmmp-admin-bot[bot]
7169f8e553 Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/15087062558
2025-05-17 16:31:32 +00:00
Dylan K. Taylor
657e6c8130
Added trigger cron workflow for RestrictedActions branch sync
we're having problems with the restricted action getting disabled due to repo inactivity,
so it's best we trigger it from here, since this repo's activity is what it's
interested in anyway.
2025-05-17 17:29:35 +01:00
pmmp-admin-bot[bot]
647c2587a8 5.28.3 is next
Commit created by: https://github.com/pmmp/RestrictedActions/actions/runs/15086729525
2025-05-17 15:45:22 +00:00
Dylan T.
81d3017ad5
Murphy's Law (#6698) 5.28.2 2025-05-17 16:44:19 +01:00
Dylan K. Taylor
a37353c060
composer: fixed borked version constraints
bruhhhhhhhhhhhh
2025-05-17 16:37:22 +01:00
pmmp-admin-bot[bot]
280911ec59 5.28.2 is next
Commit created by: https://github.com/pmmp/RestrictedActions/actions/runs/15085916916
2025-05-17 14:01:49 +00:00
Dylan T.
abb004fbc5
Ready 5.28.1 (#6696) 5.28.1 2025-05-17 15:00:53 +01:00
Dylan K. Taylor
e0864e7ee8
composer: also axe unnecessary ctype polyfill 2025-05-17 14:54:26 +01:00
Dylan K. Taylor
dca37d5842
Hack: forcibly remove symfony/polyfill-mbstring
we don't need this dependency anyway because mbstring is already provided.
2025-05-17 14:11:57 +01:00
Dylan K. Taylor
67f3bb9c52
Update composer dependencies
and fix an error found by new PHPStan update
2025-05-17 13:46:33 +01:00
Dylan K. Taylor
acf4341d71
always the CS... 2025-05-17 13:35:55 +01:00
Dylan K. Taylor
84bb9d2ab4
Consolidate Bedrock data version info
this ensures we don't have to go into a bunch of randomly scattered files to update version numbers.
2025-05-17 13:33:42 +01:00
pmmp-admin-bot[bot]
50f3fe2578 Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/14951134662
2025-05-11 01:49:34 +00:00
Sergi del Olmo
04de72e85e
Fix changelog typo (#6690) 2025-05-10 14:34:37 +01:00
pmmp-admin-bot[bot]
4bcef443f7 Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/14940598161
2025-05-10 01:40:09 +00:00
ItzxDwi
d90fc3415c
fixed wrong version info (#6689) 2025-05-09 16:33:55 +01:00
pmmp-admin-bot[bot]
e2e16a4ec5 Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/14931383427
2025-05-09 14:38:28 +00:00
pmmp-admin-bot[bot]
134c7309c5 5.28.1 is next
Commit created by: https://github.com/pmmp/RestrictedActions/actions/runs/14931216524
2025-05-09 14:30:04 +00:00
Dries C
5e830c7320
Protocol changes for 1.21.80 (#6687)
* Bedrock 1.21.80 support

* Update bedrock-data

* Add required tags to models

* Fixed biome data loading

* Support newest world format
apparently I messed up the blockstate data version last time around... it hasn't changed since 1.21.60

* always CS has to complain...

* Sync with release versions

* Ready 5.28.0 release

* this might help...

---------

Co-authored-by: Dylan T. <dktapps@pmmp.io>
5.28.0
2025-05-09 15:29:05 +01:00
Dylan K. Taylor
c1cee1fc24
Merge branch 'stable' into minor-next 2025-05-08 02:27:51 +01:00
Dylan K. Taylor
d789c75c00
Improve PHPStan error reporting for unsafe foreaches
these are actually two separate concerns: one for dodgy PHPStan type suppression on implicit keys, and the other for arrays being casted to strings by PHP.
2025-05-08 02:26:09 +01:00
Dylan K. Taylor
6196b9c995
Merge branch 'stable' into minor-next 2025-05-04 17:20:27 +01:00
Dylan K. Taylor
f2e7473629
Update PHP-CS-Fixer 2025-05-04 17:19:15 +01:00
Dylan K. Taylor
6bf9a305de
Rename confusing PHPStan rule name
it never occurred to me that this was misleading until I read some Devin documentation,
noticed that Devin misunderstood was the class was for, and then realized actually
Devin understood correctly, and it was the name of the class that was wrong. Funny
how that happens...
2025-05-03 19:24:21 +01:00
pmmp-admin-bot[bot]
f8abcd5102 Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/14786989960
2025-05-02 01:42:51 +00:00
dependabot[bot]
6f3506360e
Bump the github-actions group with 3 updates (#6683) 2025-05-01 08:30:26 +00:00
Dylan K. Taylor
efaf9311b3
Extract population business logic from PopulationTask 2025-04-30 17:38:16 +01:00
Dylan K. Taylor
fe70b31881
Fix crash when a player is added to the world 2025-04-26 22:11:03 +01:00
pmmp-admin-bot[bot]
cfafb584a8 Merge 'stable' into 'minor-next'
Automatic merge performed by: https://github.com/pmmp/RestrictedActions/actions/runs/14565559872
2025-04-21 01:45:17 +00:00
Dylan K. Taylor
ad6f7dfedb
World: verify saveability of blocks, entities and tiles at entry points
I want to do the same for items, but items are going to be a pain in the ass.
For items there are multiple possible entry points and all of them will need to be checked:
- dropped items
- inventory contents
- lecterns
- item frames

I don't see a good way to deal with all these. We can't check for registration in the constructor
because we need to fully construct the item in order to register it.

Blocks are also a potential issue in other areas, but setBlock() is definitely the biggest offender.
2025-04-20 19:48:28 +01:00