Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
85 commits
Select commit Hold shift + click to select a range
6817215
TextFormat: Added new material colours for armor trims (#5838)
maxencelobry Dec 10, 2024
ba93665
TextFormat: reduce hella duplicated code in toHTML()
dktapps Dec 10, 2024
b341078
Implement new pale oak blocks (#6570)
ipad54 Dec 12, 2024
42094e6
Implement resin blocks & items (#6571)
ipad54 Dec 12, 2024
636f562
Merge 'stable' into 'minor-next'
pmmp-admin-bot[bot] Dec 13, 2024
de66d84
Implement new 1.20 and 1.21 records (#6572)
ipad54 Dec 13, 2024
b10caf7
Remove tool tier of some blocks to match vanilla (#6573)
ipad54 Dec 13, 2024
8f8fe94
MemoryManager: Control when cycle garbage collection is run (#6554)
dktapps Dec 15, 2024
0aa6cde
Remove stupid MemoryManager settings
dktapps Dec 15, 2024
cf1b360
World: Prevent block cache from getting too big
dktapps Dec 15, 2024
742aa46
Separate memory dumping utilities from MemoryManager
dktapps Dec 15, 2024
45482e8
Fixed AsyncWorker GC not getting re-enabled after memory dump
dktapps Dec 15, 2024
8f536e6
always the CS
dktapps Dec 15, 2024
42f90e9
AsyncWorker now manually triggers GC at the end of each task run, sim…
dktapps Dec 15, 2024
80899ea
Make sure timings are counted under the proper parents
dktapps Dec 15, 2024
aee358d
This timings handler management is a crap design
dktapps Dec 16, 2024
fea17fa
RakLibServer: disable GC
dktapps Dec 19, 2024
1ff0988
Merge 'stable' into 'minor-next'
pmmp-admin-bot[bot] Dec 21, 2024
6a1d80e
tools/convert-world: fixed some UI issues
dktapps Dec 21, 2024
ada3acd
FormatConverter: ensure we don't get stalled due to stdout buffer flood
dktapps Dec 21, 2024
306623e
FormatConverter: do periodic GC
dktapps Dec 21, 2024
8a5eb71
ChunkCache: track strings in cache directly instead of CompressBatchP…
dktapps Dec 23, 2024
8cea4c1
Merge 'stable' into 'minor-next'
pmmp-admin-bot[bot] Dec 25, 2024
6ad9dde
Merge 'stable' into 'minor-next'
pmmp-admin-bot[bot] Dec 26, 2024
09c4349
Merge 'stable' into 'minor-next'
pmmp-admin-bot[bot] Dec 27, 2024
da62eb9
...
dktapps Jan 3, 2025
3da0b82
Merge branch 'stable' into minor-next
dktapps Jan 3, 2025
4a45721
Bump shivammathur/setup-php in the github-actions group (#6591)
dependabot[bot] Jan 4, 2025
8e039f2
Merge 'stable' into 'minor-next'
pmmp-admin-bot[bot] Jan 5, 2025
8b23231
Fixup PHPDoc for blocks
dktapps Jan 6, 2025
5c905d9
BlockBreakInfo: use strict comparison
dktapps Jan 6, 2025
8ee70b2
MemoryDump: fix PHPDoc types
dktapps Jan 6, 2025
90f0b85
Eliminate weak comparisons in entity package
dktapps Jan 6, 2025
59f6c85
Command: mark execute $args as being list<string>
dktapps Jan 6, 2025
e30ae48
SimpleCommandMap: ensure we always pass a list to Command::setAliases()
dktapps Jan 6, 2025
c5a1c15
TimingsCommand: beware crash on invalid timings server response
dktapps Jan 6, 2025
b6bd3ef
Improve PHPDocs in world package
dktapps Jan 6, 2025
20849d6
Fixed potential crashes in type ID tests
dktapps Jan 6, 2025
9a130bc
Config: remove bad assumptions about string root keys
dktapps Jan 6, 2025
97c5902
Internet: make postURL() error reporting behaviour more predictable
dktapps Jan 6, 2025
0358b7d
utils: avoid weak comparisons
dktapps Jan 6, 2025
357dfb5
Fixed build
dktapps Jan 6, 2025
84ec8b7
Removed dead error patterns
dktapps Jan 6, 2025
1b2d2a3
plugin: improve PHPDocs and type compliance
dktapps Jan 6, 2025
db9ba83
Make some assumptions about proc_open()
dktapps Jan 6, 2025
9592f06
PHPDoc: Restrict ReversePriorityQueue to numeric priorities
dktapps Jan 6, 2025
73edb87
SignalHandler: fixed dodgy setup logic
dktapps Jan 6, 2025
a1ba8bc
NetworkSession: improve PHPDoc types
dktapps Jan 6, 2025
d1fa6ed
InGamePacketHandler: fix weak comparisons
dktapps Jan 6, 2025
2e32c50
NetworkSession: apparently aliases are already a list at this point???
dktapps Jan 6, 2025
601be3f
stfu
dktapps Jan 6, 2025
a17512d
Command: don't trust plugins not to pass junk
dktapps Jan 6, 2025
28d31c9
Server: fixup PHPStan 2.x reported issues
dktapps Jan 7, 2025
7b1b35a
generator: fixup issues reported by PHPStan 2.0
dktapps Jan 7, 2025
cd59e27
PHPStan 2.0 fixes
dktapps Jan 7, 2025
b1c7fc0
CS
dktapps Jan 7, 2025
47cb04f
tools: fix PHPStan 2.0 issues
dktapps Jan 7, 2025
38441a6
build: avoid weak comparison
dktapps Jan 7, 2025
d69a887
Utils: fix parameter doc for printableExceptionInfo()
dktapps Jan 7, 2025
d25ec58
AsyncPoolTest: phpdoc
dktapps Jan 7, 2025
9633b7d
Update to PHPStan 2.x
dktapps Jan 7, 2025
794641c
Utils: split some horrifying code across multiple lines
dktapps Jan 7, 2025
689a799
Update NBT dependency
dktapps Jan 7, 2025
e8c4b74
LevelDB: stop overriding types from NBT
dktapps Jan 7, 2025
e34f34f
Update BedrockProtocol dependency
dktapps Jan 7, 2025
0a16daa
Avoid dodgy array_flip hash building
dktapps Jan 8, 2025
4a83920
PlayerPreLoginEvent: improve array type info
dktapps Jan 8, 2025
5e0f03d
Stub PalettedBlockArray functions that work with arrays
dktapps Jan 8, 2025
d42ec06
ZippedResourcePack: don't pass exception code to new exception
dktapps Jan 8, 2025
847ae26
PHPStan: don't remember possibly-impure function return values
dktapps Jan 8, 2025
b3f1543
Projectile: clean up dodgy code
dktapps Jan 8, 2025
f349ce7
Player: add ability to get & set flight speed multiplier (#6076)
Sergittos Jan 9, 2025
d1066d0
Bump build/php from `56cec11` to `ae94694` (#6595)
dependabot[bot] Jan 17, 2025
0b60a47
Noteblock instrument changes from 1.21.50 (#6596)
dries-c Jan 17, 2025
51cb187
Merge 'stable' into 'minor-next'
pmmp-admin-bot[bot] Jan 18, 2025
04e6317
5.23.3 (#6597)
dktapps Jan 22, 2025
3453ff0
5.23.4 is next
pmmp-admin-bot[bot] Jan 22, 2025
f7b5cd7
Merge 'stable' into 'minor-next'
pmmp-admin-bot[bot] Jan 22, 2025
ec60777
Merge branch 'minor-next' of github.com:pmmp/PocketMine-MP into minor…
dktapps Jan 22, 2025
406ddf3
Revert "Internet: make postURL() error reporting behaviour more predi…
dktapps Jan 22, 2025
6b606dc
UPnP: better fix for postURL error that doesn't require behavioural b…
dktapps Jan 22, 2025
b625fee
Prepare 5.24.0 release
dktapps Jan 22, 2025
393d7f7
5.24.0
dktapps Jan 22, 2025
fc86d3a
5.24.1 is next
pmmp-admin-bot[bot] Jan 22, 2025
3d0c26f
Merge branch 'stable' of https://github.com/pmmp/PocketMine-MP into P…
KanadeBlue Jan 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/discord-release-notify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/checkout@v4

- name: Setup PHP and tools
uses: shivammathur/setup-php@2.31.1
uses: shivammathur/setup-php@2.32.0
with:
php-version: 8.2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft-release-pr-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
- uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@2.31.1
uses: shivammathur/setup-php@2.32.0
with:
php-version: 8.2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/draft-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ jobs:
submodules: true

- name: Setup PHP
uses: shivammathur/setup-php@2.31.1
uses: shivammathur/setup-php@2.32.0
with:
php-version: ${{ env.PHP_VERSION }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- uses: actions/checkout@v4

- name: Setup PHP and tools
uses: shivammathur/setup-php@2.31.1
uses: shivammathur/setup-php@2.32.0
with:
php-version: 8.2
tools: php-cs-fixer:3.49
Expand Down
2 changes: 1 addition & 1 deletion build/php
Submodule php updated from 56cec1 to ae9469
2 changes: 1 addition & 1 deletion build/server-phar.php
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ function buildPhar(string $pharPath, string $basePath, array $includedPaths, arr
}

function main() : void{
if(ini_get("phar.readonly") == 1){
if(ini_get("phar.readonly") === "1"){
echo "Set phar.readonly to 0 with -dphar.readonly=0" . PHP_EOL;
exit(1);
}
Expand Down
10 changes: 10 additions & 0 deletions changelogs/5.23.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,3 +127,13 @@ Released 9th December 2024.

## Internals
- Removed legacy `build/make-release.php` script. This script is no longer used, as all releases should now follow the PR workflow.

# 5.23.3
Released 22nd January 2025.

## Fixes
- Fixed crashes with PHP internal stack frames being flagged as plugin crashes.
- Fixed note block instrument sounds in 1.21.50.

## Internals
- Updated GitHub issue templates to use issue forms.
108 changes: 108 additions & 0 deletions changelogs/5.24.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
# 5.24.0
Released 22nd January 2025.

This is a minor feature release, including new gameplay features, performance improvements, and minor API additions.

**Plugin compatibility:** Plugins for previous 5.x versions will run unchanged on this release, unless they use internal APIs, reflection, or packages like the `pocketmine\network\mcpe` or `pocketmine\data` namespace.
Do not update plugin minimum API versions unless you need new features added in this release.

**WARNING: If your plugin uses the `pocketmine\network\mcpe` namespace, you're not shielded by API change constraints.**
Consider using the `mcpe-protocol` directive in `plugin.yml` as a constraint if you're using packets directly.

## Performance
- PHP garbage collection is now managed by the server, instead of being automatically triggered by PHP.
- The mechanism for GC triggering is designed to mimic PHP's to avoid behavioural changes. Only the place it's triggered from should be significantly different.
- This change also avoids unnecessary GCs during object-heavy operations, such as encoding `CraftingDataPacket`. As such, performance during server join should see an improvement.
- Timings is now able to directly measure the impact of GC. Previously, GC would show up as random spikes under random timers, skewing timing results.
- `ChunkCache` now uses `string` for completed caches directly instead of keeping them wrapped in `CompressBatchPromise`s. This reduces memory usage, improves performance, and reduces GC workload.

## Configuration
- The following settings have been removed from `pocketmine.yml` and will no longer have any effect:
- `memory.garbage-collection.collect-async-worker` (now always `true`)
- `memory.garbage-collection.low-memory-trigger` (now always `true`)
- `memory.max-chunks.trigger-chunk-collect` (now always `true`)
- `memory.world-caches.disable-chunk-cache` (now always `true`)
- `memory.world-caches.low-memory-trigger` (now always `true`)

## Gameplay
- Added the following new blocks:
- All types of pale oak wood, and leaves
- Resin
- Resin Bricks, Slabs, Stairs, and Walls
- Resin Clump
- Chiseled Resin Bricks
- Some blocks have had their tool tier requirements adjusted to match latest Bedrock updates.
- Added the following new items:
- Resin Brick
- Music Disc - Creator
- Music Disc - Creator (Music Box)
- Music Disc - Precipice
- Music Disc - Relic

## API
### General
- Many places had their PHPDoc improved to address issues highlighted by PHPStan 2.x. This may cause new, previously unreported issues to be reported in plugins using PHPStan.

### `pocketmine`
- The following methods have been deprecated:
- `MemoryManager->canUseChunkCache()`
- `MemoryManager::dumpMemory()` - relocated to `MemoryDump` class

### `pocketmine\item`
- The following new enum cases have been added:
- `RecordType::DISK_CREATOR`
- `RecordType::DISK_CREATOR_MUSIC_BOX`
- `RecordType::DISK_PRECIPICE`
- `RecordType::DISK_RELIC`

### `pocketmine\player`
- The following new methods have been added:
- `public Player->getFlightSpeedMultiplier() : float` - a base multiplier for player's flight speed
- `public Player->setFlightSpeedMultiplier(float $flightSpeedMultiplier) : void` - sets the player's flight speed multiplier
- The following new constants have been added:
- `Player::DEFAULT_FLIGHT_SPEED_MULTIPLIER`

### `pocketmine\utils`
- The following new methods have been added:
- `public static TextFormat::javaToBedrock(string $string) : string` - removes unsupported Java Edition format codes to prevent them being incorrectly displayed on Bedrock
- The following methods have behavioural changes:
- `TextFormat::toHTML()` now converts `§m` to redstone red (instead of strikethrough), and `§n` to copper orange (instead of underline). This is because the codes previously used for `STRIKETHROUGH` and `UNDERLINE` conflict with the new material codes introduced by Minecraft Bedrock.
- `Terminal::toANSI()` now converts `§m` to redstone red (instead of strikethrough), and `§n` to copper orange (instead of underline), as above. However, underline and strikethrough can still be used on the terminal using `Terminal::$FORMAT_UNDERLINE` and `Terminal::$FORMAT_STRIKETHROUGH` respectively.
- The following new constants have been added:
- `TextFormat::MATERIAL_QUARTZ`
- `TextFormat::MATERIAL_IRON`
- `TextFormat::MATERIAL_NETHERITE`
- `TextFormat::MATERIAL_REDSTONE`
- `TextFormat::MATERIAL_COPPER`
- `TextFormat::MATERIAL_GOLD`
- `TextFormat::MATERIAL_EMERALD`
- `TextFormat::MATERIAL_DIAMOND`
- `TextFormat::MATERIAL_LAPIS`
- `TextFormat::MATERIAL_AMETHYST`
- The following constants have been deprecated:
- `TextFormat::STRIKETHROUGH`
- `TextFormat::UNDERLINE`
- The following static properties have been added:
- `Terminal::$COLOR_MATERIAL_QUARTZ`
- `Terminal::$COLOR_MATERIAL_IRON`
- `Terminal::$COLOR_MATERIAL_NETHERITE`
- `Terminal::$COLOR_MATERIAL_REDSTONE`
- `Terminal::$COLOR_MATERIAL_COPPER`
- `Terminal::$COLOR_MATERIAL_GOLD`
- `Terminal::$COLOR_MATERIAL_EMERALD`
- `Terminal::$COLOR_MATERIAL_DIAMOND`
- `Terminal::$COLOR_MATERIAL_LAPIS`
- `Terminal::$COLOR_MATERIAL_AMETHYST`

## Tools
- Fixed some UI issues in `tools/convert-world.php`

## Internals
- Block cache in `World` is now size-limited. This prevents memory exhaustion when plugins call `getBlock()` many thousands of times with cache misses.
- `RakLibServer` now disables PHP GC. As RakLib doesn't generate any unmanaged cycles, GC is just a waste of CPU time in this context.
- `MemoryManager` now has the responsibility for triggering cycle GC. It's checked every tick, but GC won't take place unless the GC threshold is exceeded, similar to PHP.
- This mechanism could probably do with alterations to better suit PocketMine-MP, but it was chosen to mimic PHP's own GC to minimize behavioural changes for now.
- `AsyncTask` now triggers cycle GC after `onRun()` completes. As with `MemoryManager`, this is based on a threshold designed to mimic PHP's own behaviour.
- `FormatConverter` now performs world provider GC periodically. This is not needed with current active providers, but was found to be a problem while developing custom providers.
- Various internal adjustments were made to avoid returning incorrectly-keyed arrays in the code. These changes shouldn't affect anything as the arrays should have been properly ordered anyway.
- Many places that previously used `==` and `!=` have been updated to use strict variants. This kind of change needs to be done carefully to avoid breaking `int|float` comparisons.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
"symfony/filesystem": "~6.4.0"
},
"require-dev": {
"phpstan/phpstan": "1.11.11",
"phpstan/phpstan-phpunit": "^1.1.0",
"phpstan/phpstan-strict-rules": "^1.2.0",
"phpstan/phpstan": "2.1.1",
"phpstan/phpstan-phpunit": "^2.0.0",
"phpstan/phpstan-strict-rules": "^2.0.0",
"phpunit/phpunit": "^10.5.24"
},
"autoload": {
Expand Down
Loading